Metadata-Version: 2.5
Name: iizysl
Version: 0.0.2
Summary: IPv4 CIDR arithmetic: ranges, membership and host counts.
Project-URL: Homepage, https://github.com/lqxnjk/iizysl
Author: lqxnjk
License: MIT
License-File: LICENSE
Keywords: cidr,ipaddress,ipv4,network,subnet
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# iizysl

IPv4 CIDR arithmetic without memorising `ipaddress`'s object model.

## Install

```console
pip install iizysl
```

## Usage

```python
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
