BGPKIT Parser Python Binding
Project description
bgpkit-parser-py
Python binding for bgpkit-parser
Example
from pybgpkit_parser import Parser
import json
parser = Parser(
url="https://spaces.bgpkit.org/parser/update-example",
filters={"peer_ips": "185.1.8.65, 2001:7f8:73:0:3:fa4:0:1"},
)
for elem in parser:
print(elem["origin_asns"])
print(json.dumps(elem, indent=4))
break
You can also add cache_dir
to Parser to cache the downloaded files to a specified directory.
Here is an example:
from pybgpkit_parser import Parser
import json
parser = Parser(
url="https://spaces.bgpkit.org/parser/update-example",
filters={"peer_ips": "185.1.8.65, 2001:7f8:73:0:3:fa4:0:1"},
cache_dir="./"
)
for elem in parser:
print(elem["origin_asns"])
print(json.dumps(elem, indent=4))
break
Supported Python Version
- Python3.7
- Python3.8
- Python3.9
- Python3.10
- Python3.11
- Python3.12
Installation
python3 -m pip install pybgpkit-parser
Develop
maturin develop
builds local python module and add to the venv.
Publish for Linux
Install multiple Python interpreters:
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
Build and upload for multiple interpreter versions:
maturin publish --interpreter python3.7 --skip-existing
maturin publish --interpreter python3.8 --skip-existing
maturin publish --interpreter python3.9 --skip-existing
maturin publish --interpreter python3.10 --skip-existing
maturin publish --interpreter python3.11 --skip-existing
maturin publish --interpreter python3.12 --skip-existing
Using docker
docker build -t bgpkit-builder:latest .
docker run --rm -it bgpkit-builder:latest bash
####
# TODO: copy the content of .pypirc to the root folder
####
git clone https://github.com/bgpkit/bgpkit-parser.git
cd bgpkit-parser/bgpkit-parser-py
maturin publish --interpreter python3.7 --skip-existing
maturin publish --interpreter python3.8 --skip-existing
maturin publish --interpreter python3.9 --skip-existing
maturin publish --interpreter python3.10 --skip-existing
maturin publish --interpreter python3.11 --skip-existing
maturin publish --interpreter python3.12 --skip-existing
Publish for MacOS
M1-based
Minimum support version for M1 Macs is Python 3.8
Install multiple Python interpreters:
brew install python@3.8
brew install python@3.9
brew install python@3.10
brew install python@3.11
brew install python@3.12
maturin publish --interpreter python3.8 --skip-existing
maturin publish --interpreter python3.9 --skip-existing
maturin publish --interpreter python3.10 --skip-existing
maturin publish --interpreter python3.11 --skip-existing
maturin publish --interpreter python3.12 --skip-existing
Intel-based
- add support for packaging for Intel-based Macs
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
pybgpkit_parser-0.5.0b1.tar.gz
(89.2 kB
view hashes)
Built Distributions
Close
Hashes for pybgpkit_parser-0.5.0b1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45b2e61f30c025278df4ec7fc004f7b586e4a221f5d3457e070dd4a0c64ee5c8 |
|
MD5 | a8f8eed2732253b45c6faf0f6918cfaa |
|
BLAKE2b-256 | 0ad75ea2e322c2fa8e98486bdb92da4b9cfd3e7e06904ad755444a204c25e7b6 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 101bf3738dce555395e773e428d385a8e1641aede2dac47cfa46ed62d643532b |
|
MD5 | 8a48c3f154df3e8dfe34acdcea0e8d30 |
|
BLAKE2b-256 | 3479559a5d0df027f92b84061cf8681370a5a374a9ddf8f5e61cfbb6b49e0df5 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f97e00ce028b1b850ce40b11d270dc573230fac184bf3812b636d1fd5d965cd1 |
|
MD5 | ab4058e7634892e5b7e7ba2a00c749bb |
|
BLAKE2b-256 | aadc68d9a684841f7317f8f2048a083a377b59d0e600529918cf1af4eea21fec |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc5196331c6aed90a096c823f9e7286c50d878440a75163489718fb41fef0c5 |
|
MD5 | bff3096e096ecc29d9734096c364b7d7 |
|
BLAKE2b-256 | c7b48539eeb02f30556bbe6c590425c8220664f3e4a96e18bffdf341d6e06b84 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30415dae8dee612f825f4b6a2e0e75f0e9d84819c5aaed0574f0759b30b9cc09 |
|
MD5 | cda5801ac6980c94fe51d47b52578fa3 |
|
BLAKE2b-256 | 71e13cb36d1224ddfcf64f31b133b00fe1212cb5c49835fd40bbce883da7336b |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp311-cp311-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f277aae165a7fbdd10cabdb2768df1fde43424c37e3c68d22ed40ed319e0d239 |
|
MD5 | 4565d5620e6e51b0bb2408ca2f826b9c |
|
BLAKE2b-256 | b01625d38c6d5a3a045a9e6c98b3c33b5fcf8e088646afb5964a1d19edd3b19e |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32eac717284e14cfb72fe336b7a0eefc4e02547fa5a5ffe31eec00cf5884e6ee |
|
MD5 | 554711a6c6cd3f7342c8912a6f8fff88 |
|
BLAKE2b-256 | 92486ccbb67477545bc067634b10e547258631484018f98b7eab8cf176aab397 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b04ebfd918c20e981ea3eae8fc5a6a6704333e9a315b60024ff06c0f3143b6e7 |
|
MD5 | 192bab8d12e6d4864102a0a6538933d8 |
|
BLAKE2b-256 | f01930126e758d88afa301bd45ad1a122b4db1e36090e689623e4e7b98276e77 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5dcdbd746b7ddedf1eec8bbbc7d82b7648584f74fd6d790d3cedba70f1f40c2 |
|
MD5 | 2a4cb085645c76e08291e3afd05f2d7d |
|
BLAKE2b-256 | 8949c5dcdb3e907314e5249e1e3c97590fb9f8d6bdf6e0e649c87b862a3874e0 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp310-cp310-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bae4765156a109ae1137d2d7eed3dbb0c15a2af8f7162f47401fa373018d9675 |
|
MD5 | 21d9c488b0ad063775884f970f35aadd |
|
BLAKE2b-256 | 60507f1cf58e3282b25c9a34ba1b251c7a973a67068b6cf8a127cfb88898a664 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad1ab186fbb2a9744a28b6489982d4b0495fe687200ba12b93a31b7687b2b2d0 |
|
MD5 | a4e9768217a2e9d340765e93e9aa02e8 |
|
BLAKE2b-256 | eeb475e9e859b23e8d346447b3fe930b61b2da3e22ff673480a9eaa9d9e8e314 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71f88d5dc8d5ccadaffb3928a80c2d9a286028f3f79e26987dfd2db1b14723aa |
|
MD5 | a1b21b98e1424d667677c099f47e5f43 |
|
BLAKE2b-256 | 589231018a0be70cb5d3b2e989a62a2062f8b5d69b248165b15e908dd4fea36a |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ac9ade20cefdf757f22a99a6285dca10a04ed847a4bb268b0d07f12338a261 |
|
MD5 | 1dab62daf745dc5e55e115028053dff5 |
|
BLAKE2b-256 | 4ea256d16aec342715918a9bdc6bb8947d9b8f41c6595e253db52b9207641e0c |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp39-cp39-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4098de44f741f75c571c947b658237f5ef9f8fdafca286db7f8e80548f382f23 |
|
MD5 | 19cf3b91c64f27527666e1f8d71d09e5 |
|
BLAKE2b-256 | 0ec02fa526d473d094ac419949f4e4aadaf1149d2b1e2638e40b4f06fc25fa03 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14cc1af5165eaa221d9455a7d0f4d83959f4f78078de960974edcf639e6ceb25 |
|
MD5 | 756597999d3757adcd75729c59698e69 |
|
BLAKE2b-256 | 01b85789f86efebbcd32c8ee821298904ed10ab647767f8e6ccf837d34da346b |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead3505e340e2ce511e850c327eed6a41e2da52d5ded2ea424cd1c3c3da34903 |
|
MD5 | 16f5b0bcc2780817b1c53072e1b7f4a9 |
|
BLAKE2b-256 | 98f8c05a9c7b2b5adbbb3bc84c683f7e93733ca2e78da3577fe5442751317c9e |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d78cdd174cfc8bf6aef3823b6cb889ea0ecbf57679edec867df2b8f8cc8ab9 |
|
MD5 | ae4a62bae5877033e0a806c91cab9bb6 |
|
BLAKE2b-256 | 556ef3ec377e71f7a91455b1df3387c6e0078a06b8821e5b9ad6cd4cb249e754 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp38-cp38-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e6b46bc61e26a99ce5ae7ed93bc03731ba73449e2999faa6f01f911bfc10d32 |
|
MD5 | 797b64ce2971fcd3f3c4c77466b08dcb |
|
BLAKE2b-256 | fdcde6ae98cb1ae4fc45d8b796f77599af59d1bea3acfc2a6a80147b53e15591 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9630b118f3c1e540bc4602db1d988bcf612939b03728ff49060762db5cf512ed |
|
MD5 | ffb192033d80c5ce473ddd1353dada07 |
|
BLAKE2b-256 | 67eb5a87e2522535e95fb2a4c10ee617b571695db2988d076c4024569b8aad65 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp38-cp38-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0dd8e4007b90b3c32e38c9c483afd839639d8a0538f4314bde5ab08f10e708 |
|
MD5 | 4dd929ac6128c42f6e7d7be0d3aa78dd |
|
BLAKE2b-256 | 8672cf414afb3ce424fbf716a17e3a4ac662f15714d234e8b72136296dac1a56 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp37-cp37m-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70a923904eaff0451b37c46377e3ebf003504f0e9243f187c436f374c0492ef1 |
|
MD5 | 43dc195d2a7e8b65bb91ecfd7611b589 |
|
BLAKE2b-256 | 89391d19c56cc06c168473d0c18bb943917d2673034822cf96c9c643d1047272 |
Close
Hashes for pybgpkit_parser-0.5.0b1-cp37-cp37m-manylinux_2_34_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736d95f81fc049785cfa2955eca6411ce8bbe190deee8ab9dea43c752da10dd7 |
|
MD5 | ecb026b3895d430b13eb9997b27ff5de |
|
BLAKE2b-256 | 5dc20685c33068b65b0032305e80f28969f95f0b796e29e57b519b9ab28d5b9e |