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.to_dict(), 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.to_dict(), indent=4))
break
Available fields for Elem
#[pyclass]
#[derive(Clone, PartialEq)]
pub struct Elem {
#[pyo3(get, set)]
pub timestamp: f64,
#[pyo3(get, set)]
pub elem_type: String,
#[pyo3(get, set)]
pub peer_ip: String,
#[pyo3(get, set)]
pub peer_asn: u32,
#[pyo3(get, set)]
pub prefix: String,
#[pyo3(get, set)]
pub next_hop: Option<String>,
#[pyo3(get, set)]
pub as_path: Option<String>,
#[pyo3(get, set)]
pub origin_asns: Option<Vec<u32>>,
#[pyo3(get, set)]
pub origin: Option<String>,
#[pyo3(get, set)]
pub local_pref: Option<u32>,
#[pyo3(get, set)]
pub med: Option<u32>,
#[pyo3(get, set)]
pub communities: Option<Vec<String>>,
#[pyo3(get, set)]
pub atomic: Option<String>,
#[pyo3(get, set)]
pub aggr_asn: Option<u32>,
#[pyo3(get, set)]
pub aggr_ip: Option<String>,
}
Supported Python Version
- Python3.9
- Python3.10
- Python3.11
- Python3.12
- Python3.13
Installation
python3 -m pip install pybgpkit-parser
Develop
maturin develop builds local python module and add to the venv.
Build and publish
See BUILD.md for more details.
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybgpkit_parser-0.6.2.tar.gz.
File metadata
- Download URL: pybgpkit_parser-0.6.2.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a5937532edc8b7ded21e07ea01082ad90caa6c0182d1d4573c3c29880953b6
|
|
| MD5 |
21611679ce0a86d1a090fb66c8e09b16
|
|
| BLAKE2b-256 |
a1456d4fe982e6b6bff8b3fb73ff15c8273c274183c9436865a185f5557af025
|
File details
Details for the file pybgpkit_parser-0.6.2-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baf6ad6cc94f4bd2a4bee16c7388ea6e0b3d9c4e6c643a67e156aeb00b2f85c0
|
|
| MD5 |
2b6715ea051be2dedd00e1c8b62cf114
|
|
| BLAKE2b-256 |
a131cd3c679032cfd45de0657211854f33db66f54b73f61d039525f066e88fe6
|
File details
Details for the file pybgpkit_parser-0.6.2-cp313-cp313-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp313-cp313-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c52a45051d9add4adb93f20680f6b4eeafef99e5bcab904007766b061585c65
|
|
| MD5 |
d13855ad4aa3a01592c2d92799a31aa6
|
|
| BLAKE2b-256 |
f874b950abf5d4570a7500217551ca576caa007b22ba6f74f5881948a93b08cb
|
File details
Details for the file pybgpkit_parser-0.6.2-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166d50afdd48fd617a2c7d34d7a84d3dccaf7ed8f54da7c06f4c74465b8e7df5
|
|
| MD5 |
1408e65eaeb3013cc10451e78269923c
|
|
| BLAKE2b-256 |
da3f6e77903260aac71958908258a5cedb7beee08606eb09c4ceb93edcc4cb30
|
File details
Details for the file pybgpkit_parser-0.6.2-cp313-cp313-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b01b02ce9fc26d1f52c59f8596c9a59c0c94cb73d36cf99f6ef464246ab8c912
|
|
| MD5 |
3012fc61429c1f249e63b5eedfe75abb
|
|
| BLAKE2b-256 |
505c217f028aeee7201d4bac82845a9ab87f655f5d095b3d4ea447e50c9f08b6
|
File details
Details for the file pybgpkit_parser-0.6.2-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdea488aa5d6c65ae90518ddce68f53c65559bee325ef2442c39e8627e65b787
|
|
| MD5 |
a0d449ea41503421e309244fd21b1cdb
|
|
| BLAKE2b-256 |
0aa7e99e8f7eb401d35cc38e1587a958bce6c39c4f962b19e27488aab0e685a4
|
File details
Details for the file pybgpkit_parser-0.6.2-cp312-cp312-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp312-cp312-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd27fa010f2476af1c623a82939bc700becb2c9b802f402eba03d266a0dcebd3
|
|
| MD5 |
2b02526ec6b878b763f587a6f8f9e738
|
|
| BLAKE2b-256 |
62f7b91694592f58ea9b323f48aa23a0bd753d89a6db55dbcf57abf8a6ffe67e
|
File details
Details for the file pybgpkit_parser-0.6.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3efb89c1826849bd308961eab28f94c6290e1ba70091f89f770d0c3965eba1e
|
|
| MD5 |
a29af4a311e703585b827b4f361cf7bf
|
|
| BLAKE2b-256 |
dd5bdd758fb116e1c73002d6223c24dcb7bbc6a89f625e273086b2295b692780
|
File details
Details for the file pybgpkit_parser-0.6.2-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa341c9bb2b2564f89f44d0e973c5bc32ba647f7eec02ddb814151040c163f08
|
|
| MD5 |
de41e9622c8ded9c34083a31ce92b8f2
|
|
| BLAKE2b-256 |
d46c9f4d06df24f0e3ebb79d0653153cd7e7f62675f41f9fec3deee2ad7d60f2
|
File details
Details for the file pybgpkit_parser-0.6.2-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4191e1b5f1d08400e82e1881a593feee2c8f3ed2c4fd7130c7f02da1056e55b0
|
|
| MD5 |
40d1d824b8196b69d4855a1aa46328b4
|
|
| BLAKE2b-256 |
61b9504bf0e4e8ad01ebc59992ff297a22dd228c29e048ff59d72a2973948027
|
File details
Details for the file pybgpkit_parser-0.6.2-cp311-cp311-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp311-cp311-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9769ae20a0c59085e51cd43761c081eac2d399ca1c744eddfdeaaa40170f2b7
|
|
| MD5 |
4572c5d280c368a5f44ceed529794a34
|
|
| BLAKE2b-256 |
9c74b294ecabb9018c868f0d61d0e1d05e533b85af2c35bfe676a29253edba44
|
File details
Details for the file pybgpkit_parser-0.6.2-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98178d9781581ecc9e46d8acc9459c58e78878bd671a4cbfe497759d1c6fecd0
|
|
| MD5 |
7e345fbffee97da13d656d894c2a9ece
|
|
| BLAKE2b-256 |
0c7339c2f4c3a81158e30cc507dab4584a11a454158508decbe85ee148d8b169
|
File details
Details for the file pybgpkit_parser-0.6.2-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c42fd855c6ec87bf52c7578c272d239b5bb662f2dcd8fc29215c5e58297e99d
|
|
| MD5 |
e3d6d93309156a589f6b1e9ae279d64d
|
|
| BLAKE2b-256 |
16e1ed153a5fa6490e3cd6fd3148276c03fe32f973f19b797b8a15d2a35fe96b
|
File details
Details for the file pybgpkit_parser-0.6.2-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
994d400e9dcd9d67d2972f594234af86a2f33cad2cea73a8a2917cf8721f20fd
|
|
| MD5 |
54403ac219ff16b95ee20c92f44fc260
|
|
| BLAKE2b-256 |
57a60d85d4af449f36e1fe96b1dfbadbd0d9221c6029af909b1ebd04ce3cec64
|
File details
Details for the file pybgpkit_parser-0.6.2-cp310-cp310-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp310-cp310-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bab46f5ed709fe356f14e2f9a85114055c72cae36cead6d62a6579a67657963
|
|
| MD5 |
60d074bb6521cacda9d12370e071f15e
|
|
| BLAKE2b-256 |
3c340d3de53825d29c35f61a62f0230af4e7474d336d8aeed60ff3c3c1aa6059
|
File details
Details for the file pybgpkit_parser-0.6.2-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa98ca3701a4cd179fcc995fcb7f4685f2884608bf46e1e5940fa3622162d380
|
|
| MD5 |
528bc4be7457c3e15bad3fa8136b86aa
|
|
| BLAKE2b-256 |
03999894da20ef4f4fd93388858f2f4e2c6023b5a527ad809c541553517df154
|
File details
Details for the file pybgpkit_parser-0.6.2-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2fe780393b7a5ca7a1212e569f3bf52bc3a007b05f85e5d0e4bcf80eec7b5ca
|
|
| MD5 |
d3a29196e8f475aa028987e141519631
|
|
| BLAKE2b-256 |
884e98cd220d99b53dc7727b82248eb6a3279ce532a7ea6557c4455bfeeaac23
|
File details
Details for the file pybgpkit_parser-0.6.2-cp39-cp39-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp39-cp39-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434f6dd27af278b746ced2eacd94414da26d68cd0ec92077710bcdfe28a37eea
|
|
| MD5 |
3ce9d9a7b68736833c5e67cc937cc729
|
|
| BLAKE2b-256 |
64a78fb4f229c322c3a1061f6caf1ecebeccd22731ea7b755a26711a5f74e2fd
|
File details
Details for the file pybgpkit_parser-0.6.2-cp39-cp39-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp39-cp39-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 21.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b5bc78dbcd366950bc8f1f8fa5d1e18c4ece06f372524abe8726f5fbe03a194
|
|
| MD5 |
13fc36655b327239d11d4bc993b1e77a
|
|
| BLAKE2b-256 |
a6c64e724488d6f75761e2d848859da7ac78456aafde1c7f8626594ad5798660
|
File details
Details for the file pybgpkit_parser-0.6.2-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a63c0a8a4bce8cae142a9a78402fbf5a8e91088bff6e464a3882640ef595c4e
|
|
| MD5 |
bea92deac2ec6ca1caa7059622ac6b07
|
|
| BLAKE2b-256 |
9f200afe27d70b726784f72b146d5edc6eebd19058c256d66490fd6b1d1b2c93
|
File details
Details for the file pybgpkit_parser-0.6.2-cp39-cp39-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pybgpkit_parser-0.6.2-cp39-cp39-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.8 MB
- Tags: CPython 3.9, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3949acc7667840ac160ee2f4cd1b998328c041ec054c65f8a4f0eb64eac11e9
|
|
| MD5 |
eebe1f1620a7d7c622fadff7adaa3a9c
|
|
| BLAKE2b-256 |
a2f461f566e6f4fa913dcf9e928a1aed0ddfecd8dcaed1c465e29cb9c8e84193
|