Skip to main content

Downloads ROA info solely for research purposes

Project description

Informational Badges:

PyPI version PyPy PyPI - Python Version Tests Linux macOS Intel macOS ARM

Some Linting Badges (Where I could find them):

Ruff Code style: black Checked with mypy Imports: isort Pylint try/except style: tryceratops

roa_collector

If you like the repo, it would be awesome if you could add a star to it! It really helps out the visibility. Also for any questions at all we'd love to hear from you at jfuruness@gmail.com

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 check roa_collector
ruff format 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 --skip-missing-interpreters

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-2.0.8.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

roa_collector-2.0.8-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file roa_collector-2.0.8.tar.gz.

File metadata

  • Download URL: roa_collector-2.0.8.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for roa_collector-2.0.8.tar.gz
Algorithm Hash digest
SHA256 ea54b0b68f8611bdd62cf92be1c4e6bc71d9750059201dece0543c1c5835ed5b
MD5 003e4e032be09a1b1a2e0144bb989c17
BLAKE2b-256 fe2b1c46a11b7c53bc1bf03c0ab30576e8018781cc1369994e0967784f9088a1

See more details on using hashes here.

File details

Details for the file roa_collector-2.0.8-py3-none-any.whl.

File metadata

  • Download URL: roa_collector-2.0.8-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for roa_collector-2.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8e6ba3c5b4641d5ee6baa8bcbab54158d9f3c5a6d8af6dd6218b81d1fb4a1bcd
MD5 04fa67fe795a87c5486273deee636e10
BLAKE2b-256 49d90f11dbab5249f09e40b62e1dda05b6d5d3ded0a2975ec5929d88c990e79a

See more details on using hashes here.

Supported by

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