Registry / http-networking / bogons

bogons

JSON →
library1.0.3pypypi✓ verified 80d ago

Python library for generating and checking IP & ASN bogons (martian packets). Current version 1.0.3, release cadence irregular.

pip install bogons
INSTALL
IMPORT
SIG · BOGONS
B
bogons
http-networkingpythonv1.0.3
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bogons
import bogons
from bogons import BogonChecker
is_public_ip
from bogons import is_public_ip
valid_public_asn
from bogons import valid_public_asn

Basic usage: create a BogonChecker instance and check if an IP is a bogon.

from bogons import BogonChecker checker = BogonChecker() print(checker.is_bogon('192.168.1.1')) # True print(checker.is_bogon('8.8.8.8')) # False
Debug
Known issues
gotchaBogonChecker downloads bogon lists on first instantiation. If offline or slow network, initialization may hang.
fix
Ensure network connectivity or pre-download lists.
affects: *
gotchaThe library requires Python >=3.6. No support for Python 2.
fix
Use Python 3.6+.
affects: >=1.0
Upgrade
Version history
1.0.3latest on PyPI · released Feb 16, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
24
OpenAI (training)
1
Resources
bogons — pip install bogons · libregistry