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
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
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
Publish for MacOS
maturin publish --skip-existing
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.4.0.tar.gz
(171.1 kB
view hashes)
Built Distributions
Close
Hashes for pybgpkit_parser-0.4.0-cp311-cp311-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b703a420dd9510331681279497567352143127dd6844318028fd308aaed8349c |
|
MD5 | 5b47972d4210cdd0c343575a0dd3a89a |
|
BLAKE2b-256 | eaded68635aad535d8c3e6a7a6905a0127b41ab36f4bc6408b2da23f7f336879 |
Close
Hashes for pybgpkit_parser-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce759945c509459bfaa5c6a68686ad7757187200faaaa97d7aafa16faf1103cd |
|
MD5 | 5e2887176e83734d12d17c1cec16af12 |
|
BLAKE2b-256 | c91b4da880ff2036bd3e9d7f7ab7797cfac33e6ef5db2ff7fa12f4524047fc8c |
Close
Hashes for pybgpkit_parser-0.4.0-cp310-cp310-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3008c7e6ecdc206c7857dd9d0c5ba40a272c796f00fb877c641d1f6dfdf7521f |
|
MD5 | 9e4c477d42cd64d0ba998b0e46f0424b |
|
BLAKE2b-256 | 1bbc21099f541508f263beb12830a75d72e81105c39d97692be9e593263bf145 |
Close
Hashes for pybgpkit_parser-0.4.0-cp39-cp39-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c4e128bbcc8dead1421975605f689c8e191f26b735ccb1808d143e4946f9db7 |
|
MD5 | bae45d347f864ec3865f83e7a5f1cb74 |
|
BLAKE2b-256 | 585248865c007947e655b5f35824b65be8b69995bbdcf8d93fbb8285cc7e0534 |
Close
Hashes for pybgpkit_parser-0.4.0-cp38-cp38-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcf60d6fda3cc44e01379a44a22123463db723e5820f25c18d041c651d31eeff |
|
MD5 | 25dd090d307899a8935c4da4fa1993c7 |
|
BLAKE2b-256 | 0b91fe5aa0062623bcbf6f10794c369591aa9c5bc931f7a7c97e12b8e1cc287b |
Close
Hashes for pybgpkit_parser-0.4.0-cp37-cp37m-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e8d0ad9a1c07b12047a08ac5c2a9102f92ba9ed55d70595852137e51d34cfe |
|
MD5 | 1dadaac4dfc03ace025443fcd3871d81 |
|
BLAKE2b-256 | f2b7edaf19f4d5b4ff5a232be383acea255c62253baa4e104d2cba31ea003d55 |