========
A comprehensive pure-Python wrapper for the OnionOO Tor status API, with memcached support to cache queried data.
Installing OnionPy
===================
You can install onion-py manually by doing the following (requires setuptools!)::
git clone https://github.com/duk3luk3/onion-py.git
cd onion-py
#run tests if desired
PYTHONPATH=. python bin/onion.py test
sudo python setup.py install
For the optional memcached support, install pymemcache and six::
sudo pip install six
sudo pip install https://github.com/pinterest/pymemcache.git
The package is also on [Pypi](https://pypi.python.org/pypi/OnionPy).
**Beware**: <del>OnionPy has been developed and tested exclusively with Python 3. Please let Python 2 rest in peace forevermore.</del> OnionPy is compatible with Python 2.7 upwards.
Usage
=====
>>> from onion_py.manager import Manager
>>> from onion_py.caching import OnionSimpleCache
>>> manager = Manager(OnionSimpleCache())
>>> s = manager.query('summary', limit=4)
>>> s.relays[0].fingerprint
'695D027F728A3B95D0D7F6464D63F82229BFA361'
>>> s.relays[0].nickname
'GREATWHITENORTH'
Accepted Queries
=====
Summary, details, bandwidth, weights, clients, uptime
>>> s = manager.query('summary', limit=4)
>>> s = manager.query('details', limit=4)
>>> s = manager.query('bandwidth', limit=4)
>>> s = manager.query('weights', limit=4)
>>> s = manager.query('clients', limit=4)
>>> s = manager.query('uptime', limit=4)
License
=======
BSD 3-clause. See LICENSE.
Portions of this work obviously belong to to OnionOO and therefore the Tor Project. See ONIONOO-LICENSE.
Metadata
Release files for OnionPy 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| OnionPy-0.5.0.tar.gz | 8.9 kB | Without provenance | Details for OnionPy-0.5.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| OnionPy-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for OnionPy-0.5.0-py3-none-any.whl |
| OnionPy-0.5.0-py2-none-any.whl | Python 2 | none | any | Details for OnionPy-0.5.0-py2-none-any.whl |
Total release size: 31.3 kB
Release files / OnionPy-0.5.0.tar.gz
| Download URL | OnionPy-0.5.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c049d0970b868867ace27c7aabb4427ec7d4b2dfadcf61e2e87ed6793842128
|
|
BLAKE2b-256 checksum How to use checksums |
8111e85ae3c7c71730c9f8c3c912d572f7b7fbc605b103ece722c223a15b21c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / OnionPy-0.5.0-py3-none-any.whl
| Download URL | OnionPy-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4faac7abe40d84e36e53a0ac8684248f039b713ef203032b11169e1f93177bde
|
|
BLAKE2b-256 checksum How to use checksums |
d075fdc9e64a27bfbb63424ff8232755f3f66426259080ecf913fe7d365d0f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / OnionPy-0.5.0-py2-none-any.whl
| Download URL | OnionPy-0.5.0-py2-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
9bbc20c943c78a40c55d5e28d5ad041756b5b127832731e300e7f3ddee12615f
|
|
BLAKE2b-256 checksum How to use checksums |
23aef4ac89fecf800d385a8f082d0f3d8b2fa6b3c26e8cebe4bc37e74aa1baa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for OnionPy 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.