PRSW, the Python RIPE Stat Wrapper, is a python package that simplifies access to the RIPE Stat public data API.
Project description
PRSW, the RIPE Stat Wrapper, is a Python package that allows for simple access to the RIPEstat Data API.
Installation
PRSW is supported on Python 3.7+ and can be installed via pip.
pip install prsw
To install the latest development version run the following instead:
pip install --upgrade https://github.com/jvoss/prsw/archive/master.zip
Quickstart
RIPEstat can be instantiated with a few options. For details see the documentation at https://prsw.readthedocs.io.
To instantiate a basic instance of RIPEstat:
import prsw
ripe = prsw.RIPEstat()
With the ripe instance you can interact with the RIPEstat API:
# Find all announced prefixes for a Autonomous System
prefixes = ripe.announced_prefixes(3333)
# Interact with the looking glass
for collector in ripe.looking_glass('140.78.0.0/16'):
print(collector.location)
for peer in collector.peers:
print(
peer.asn_origin,
peer.as_path,
peer.community,
peer.last_update,
peer.prefix,
peer.peer,
peer.origin,
peer.next_hop,
peer.latest_time
)
# Check RPKI validation status
print(ripe.rpki_validation_status(3333, '193.0.0.0/21').status)
Please see the documentation for more options.
Contributing
Contributions are encouraged. Please see CONTRIBUTING for details.
Acknowledgements
Inspiration for several elements of this project came from PRAW, the Python Reddit API Wrapper.
License
PRSW is licened under the Simplified BSD License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prsw-0.3.1.tar.gz
.
File metadata
- Download URL: prsw-0.3.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7065bb2875f1d8a9fb602337096d65e8a25aeaca553d6c0cc0c5f3eaffcace2b |
|
MD5 | 8411c1808fc4e72900e7e58a0ae379d6 |
|
BLAKE2b-256 | bd28f95a94daad31f449f3ca455fe2eefe59a2e7e323f1109fdb7b4a62a91f88 |
File details
Details for the file prsw-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: prsw-0.3.1-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad200c333403f7f617be92acf100168d728b2c41fdc5a59ff22b3288c43342db |
|
MD5 | 6ad6d91a33d8c2f11761987c25fec0a6 |
|
BLAKE2b-256 | 3e3b69b8483cee534aee6ee8a9e63233f5a6e977fea13af189b4f3435e0cdd90 |