Skip to content

jvoss/prsw

Repository files navigation

PRSW: Python RIPE Stat Wrapper

Latest Version Supported Python Versions GitHub Actions Tests Coveralls Documentation Status

PRSW, the RIPE Stat Wrapper, is a Python package that allows for simple access to the RIPEstat Data API.

Quickstart

RIPEstat can be instantiated with a few options. For details see the documentation.

  1. Instantiate a basic instance of RIPEstat:
import prsw

ripe = prsw.RIPEstat()
  1. With the ripe instance you can interact with the RIPEstat API as python objects:
# 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.

Installation

Via pip:

pip install prsw

Install the latest development version:

pip install --upgrade https://github.com/jvoss/prsw/archive/master.zip

Via uv:

uv add prsw

Install the latest development version:

uv add git+https://github.com/jvoss/prsw.git

Contributing

Contributions are encouraged. Please see CONTRIBUTING.md for details.

Acknowledgements

Inspiration for several elements of this project originally came from PRAW, the Python Reddit API Wrapper.

License

PRSW is licensed under the Simplified BSD License.

About

A Pythonic interface to the RIPEstat public data API.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages