Skip to main content

Downloads ROA info solely for research purposes

Project description

Python 3.10 Python 3.11 Python 3.12 Tests Ruff Code style: black Checked with mypy

roa_collector

Package Description

Downloads ROAs from https://rpki-validator.ripe.net/api/export.json, inserts them in a CSV, and returns them as a list of ROA dataclasses (containing asn, prefix, max_length, and ta properties, where ta is RIPE, afrinic, etc)

Usage

from a script:

from pathlib import Path

from roa_collector import ROACollector

csv_path = Path("/tmp/my_csv_path.csv")  # or set to None to avoid writing
roas = ROACollector(csv_path).run()

Installation

Install python and pip if you have not already.

Then run:

# Needed for graphviz and Pillow
pip3 install pip --upgrade
pip3 install wheel

For production:

pip3 install roa_collector

This will install the package and all of it's python dependencies.

If you want to install the project for development:

git clone https://github.com/jfuruness/roa_collector.git
cd roa_collector
pip3 install -e .[test]
pre-commit install

To test the development package: Testing

Testing

To test the package after installation:

cd roa_collector
pytest roa_collector
ruff roa_collector
black roa_collector
mypy roa_collector

If you want to run it across multiple environments, and have python 3.10 and 3.11 installed:

cd roa_collector
tox

Development/Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Test it
  4. Run tox
  5. Commit your changes: git commit -am 'Add some feature'
  6. Push to the branch: git push origin my-new-feature
  7. Ensure github actions are passing tests
  8. Email me at jfuruness@gmail.com if it's been a while and I haven't seen it

License

BSD License (see license file)

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

roa_collector-1.3.2.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

roa_collector-1.3.2-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page