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
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
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
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.1.tar.gz
(171.9 kB
view hashes)
Built Distributions
Close
Hashes for pybgpkit_parser-0.4.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e038897d577e5056e3078c081832f0d528e505da9d8134faa3f871568b2cbcf5 |
|
MD5 | f6275bc063b90d950566f950da0373b7 |
|
BLAKE2b-256 | 77e5837c0835a46d8653bb4c48b6ba3d1a6c037f83613c87358e9bff6c8461d6 |
Close
Hashes for pybgpkit_parser-0.4.1-cp311-cp311-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4177cde870967c2ed570d2548327a4a229aaaaa5386dccc6b929ed922d73b126 |
|
MD5 | d362c2da6c4768ccaa3a52ca6901b26a |
|
BLAKE2b-256 | b8bd001fa87780f4b1e2f4bef7c71742afb6f63091003e3d50e94d092815efcf |
Close
Hashes for pybgpkit_parser-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 631243a3f62650ecdb0b9e822d857dd0cbfb4de7f2b5864e0000d5c9b0d81db1 |
|
MD5 | 02c125022bbc047cf165b78a65128290 |
|
BLAKE2b-256 | 7f4c89f44430e37a57a376297db753b83867b74cd60683db8e2e092aac534bba |
Close
Hashes for pybgpkit_parser-0.4.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71144bea12d2b6fba454649cabae1eb8c73aa81f97beef6b2ff5a67900b1c1e9 |
|
MD5 | 1ebfaf632adcdbd3088938064ceff5cc |
|
BLAKE2b-256 | 4cde21574b893b2a0dbb28b456a9d4e99eabb0b1ddf095c90b9d5672498263d9 |
Close
Hashes for pybgpkit_parser-0.4.1-cp310-cp310-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d82de05175d9a84636c7d22346195aeed8252c25d2166ce02cad29a0460eb95f |
|
MD5 | ff81b90671338242710c13d5cdd1b8e4 |
|
BLAKE2b-256 | a1c71ba6bc7f0e881f663b6cb9d07a3e013995dbdfa5e8df0fc8d28dae3428a1 |
Close
Hashes for pybgpkit_parser-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f7d6eaac7831b88582ca629a6051ca11da09dddb69ab659839e7841b51aa297 |
|
MD5 | 94c1de46013de4c2fb94090ac2154cd5 |
|
BLAKE2b-256 | 1d690a28f63b7f63048e4dd3ad3c342a894d9d2616e53c46b1bee6ce5ed7fb47 |
Close
Hashes for pybgpkit_parser-0.4.1-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8c599ab3c511df4cb5f1eb5123d0d3c108feba758967c636463ac91cdb3471d |
|
MD5 | 2ddd892c441958c761378cd91be3c381 |
|
BLAKE2b-256 | f4468b5fc350cd803155995d76cddb748663d1871fee7f2b32ddd7ffde4794ab |
Close
Hashes for pybgpkit_parser-0.4.1-cp39-cp39-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84846545fbbd9bee9576f0d37a6c9e22c806fb82c265e116e814cb22c4558f54 |
|
MD5 | c46a620b081edbfe6f91291b79ca8f60 |
|
BLAKE2b-256 | e36b52fb5dc0d59e5b0c6c53abb6031cc51096339afc1095e1dda69d6e681787 |
Close
Hashes for pybgpkit_parser-0.4.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d76e589c6ca6ebcfbe19766f9380ecfea59d72944610a8c525f394b8dd18eb47 |
|
MD5 | c2f0c1fb73f1de7406f1190ea2fdd6eb |
|
BLAKE2b-256 | 29dfc50ea7f8cf979b9e2e94817a3a4b507c3829afa3764e1fb456136b07945f |
Close
Hashes for pybgpkit_parser-0.4.1-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73ee87ee413b6e36d6c3d0226566c33a17f2f3dcea7802da78e1b9c87b2cf0cc |
|
MD5 | b9b65d29b39d4e90fc7920e7777c3ca7 |
|
BLAKE2b-256 | 69bd5fc78c0c1cdd4d254ec9ec21480d5cb5c5cdc9579d9f62666317221ac579 |
Close
Hashes for pybgpkit_parser-0.4.1-cp38-cp38-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9962edc2d6085ad158aad9c1c3cb039d44168f8770aa0b7b3fbd1b6d08b4c1f0 |
|
MD5 | 13bab126f6195248a62830eed12671d1 |
|
BLAKE2b-256 | 584d11a1a22416d5d806d4cfea61ad27d5a33ffc0c0b794dc2c12e761701d811 |
Close
Hashes for pybgpkit_parser-0.4.1-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bef177e9a4ab51d34c25c1b788d2c2cef35102acfcffc56f1d2a7b2e0b3a2409 |
|
MD5 | ac1b137d739e66b0467cff752491682b |
|
BLAKE2b-256 | 4c48b0b8064e107fb3cdc369123332ec7edb0c721f2e2369f1b7a80d03e53953 |
Close
Hashes for pybgpkit_parser-0.4.1-cp37-cp37m-manylinux_2_27_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0dc0466ae02c5cc455e48da48079ee94b40c6faffaeed5b5d134d1b58e00c45 |
|
MD5 | 024ac852b8d0606c48cb7873056770da |
|
BLAKE2b-256 | a02ceea2b6c03019dfc1ef04e108b6c9161916dda3b9da1203afb1f5380e72a0 |