Skip to main content

iizysl

IPv4 CIDR arithmetic without memorising ipaddress's object model.

Install

pip install iizysl

Usage

from iizysl import contains, iter_hosts, network_info

info = network_info("10.0.0.0/24")
info.as_dict()
# {'network': '10.0.0.0', 'prefix': 24, 'netmask': '255.255.255.0',
#  'broadcast': '10.0.0.255', 'first': '10.0.0.0', 'last': '10.0.0.255',
#  'hosts': 254}

contains("10.0.0.0/24", "10.0.0.7")      # True
contains("10.0.0.0/24", "10.0.1.7")      # False
iter_hosts("10.0.0.0/30")                # ['10.0.0.1', '10.0.0.2']

Notes

Item Behaviour
host bits set accepted, network is normalized (strict=False)
/31 and /32 all addresses are treated as usable, no broadcast
invalid input ValueError, never a silent fallback

License

MIT

Metadata

Release files for iizysl 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iizysl 0.0.2
File Size Uploaded Provenance Actions
iizysl-0.0.2.tar.gz 3.0 kB Without provenance Details for iizysl-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for iizysl 0.0.2
File Interpreter ABI Platform Actions
iizysl-0.0.2-py3-none-any.whl Python 3 none any Details for iizysl-0.0.2-py3-none-any.whl

Total release size: 6.5 kB

Release files / iizysl-0.0.2.tar.gz

Download URL iizysl-0.0.2.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e03b3c4e1177e9ffd51306791497a35a5a7e4429d49dcec021edc4d8f185a14f
BLAKE2b-256 checksum
How to use checksums
ed7a887eb899d44d0d92a1cd9fddac84eb6bc187e4b78e6fd671e9ecc6e0d191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / iizysl-0.0.2-py3-none-any.whl

Download URL iizysl-0.0.2-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15d45367d24c06a37784c45bc0121fe1be79fa11e6b7c0c12ca277e05389df54
BLAKE2b-256 checksum
How to use checksums
3b5fd9d83cd9b2209568f1e6b20f0bd3b64d1d71eef15820071ba965520e0ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Security for iizysl 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page