Downloads ROA info solely for research purposes
Project description
Informational Badges:
Some Linting Badges (Where I could find them):
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Test it
- Run tox
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Ensure github actions are passing tests
- 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
Release history Release notifications | RSS feed
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
Hashes for roa_collector-2.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a2c3fe4a5afde8c942621630009110afaf24f10f7cc56c18cc5988814721253 |
|
MD5 | 3c141dbe8d4ccae86854f2d3b3180762 |
|
BLAKE2b-256 | 2013357f80afac6aa26780fde56f2c10db2c96fd89216c665870112308bc1a7d |