isc-dhcp-leases
Small python module for reading /var/lib/dhcp/dhcpd.leases from isc-dhcp-server
Decision gist · record as of 2026-08-14
Yes, if you need to read ISC DHCP lease files on a system running the isc-dhcp-server daemon. The package is stable, has no known vulnerabilities, and installs with minimal friction. However, be aware that maintenance is dormant (last update 1244 days ago); if you encounter issues with modern Python versions or need active support, you may need to fork or patch it yourself.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- The dhcpd.leases file must be readable by the Python process; typically requires running as root or the dhcp user, or adjusting file permissions on the lease file.
- Low friction: pure Python wheel with a single dependency (six).
- Maintenance is dormant—last release was 1244 days ago—but the package is marked Production/Stable and has no known vulnerabilities, so it is unlikely to require updates for basic use.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely as long as you retain the license notice.
last release 2023-03-19 (1244 days) · last repo commit 2024-02-27 · 129 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 194,267 downloads/mo, #9,840 on PyPI
Alternatives
Verify before relying
from isc_dhcp_leases import IscDhcpLeases
leases = IscDhcpLeases('/var/lib/dhcp/dhcpd.leases')
current = leases.get_current() # dict keyed by MAC address
for mac, lease in current.items():
print(f"{mac}: {lease.ip} (expires {lease.end})")- Whether the package still works reliably with modern Python 3.x versions beyond 3.5, given the last release was in March 2023.
- Whether gzip-compressed lease file support (mentioned in the description) is fully tested and maintained.
What it is and what it does
isc-dhcp-leases is a small parser for ISC DHCP server lease database files. It reads the dhcpd.leases file (or dhcpd6.leases for IPv6) and exposes lease records as Python objects with properties like IP address, MAC address, expiration time, binding state, and hostname. You instantiate IscDhcpLeases with a file path, then call get() to retrieve all leases or get_current() to filter only active, non-expired leases.
The package supports both IPv4 (Lease objects) and IPv6 (Lease6 objects) lease formats. It can read plain text or gzip-compressed lease files. Its only runtime dependency is six, making it lightweight. The module is useful for monitoring DHCP server state, auditing active leases, or integrating lease data into network management tools.
Use it for
- Monitor active DHCP leases on a server to track which devices are currently connected and their IP assignments.
- Audit expired or abandoned leases to understand historical DHCP allocation patterns.
- Integrate lease data into a network management dashboard or monitoring system.
- Query lease information by MAC address to find the IP assigned to a specific device.
- Parse IPv6 lease files to track temporary and delegated prefix assignments in dual-stack networks.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to read ISC DHCP lease files on a system running the isc-dhcp-server daemon.
The package is stable, has no known vulnerabilities, and installs with minimal friction. However, be aware that maintenance is dormant (last update 1244 days ago); if you encounter issues with modern Python versions or need active support, you may need to fork or patch it yourself.
Install
isc-dhcp-leases on PyPI
Before you install
Low friction: pure Python wheel with a single dependency (six). Maintenance is dormant—last release was 1244 days ago—but the package is marked Production/Stable and has no known vulnerabilities, so it is unlikely to require updates for basic use.
The dhcpd.leases file must be readable by the Python process; typically requires running as root or the dhcp user, or adjusting file permissions on the lease file.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely as long as you retain the license notice.
Quickstart
from isc_dhcp_leases import IscDhcpLeases
leases = IscDhcpLeases('/var/lib/dhcp/dhcpd.leases')
current = leases.get_current() # dict keyed by MAC address
for mac, lease in current.items():
print(f"{mac}: {lease.ip} (expires {lease.end})")
Verify before relying
- Whether the package still works reliably with modern Python 3.x versions beyond 3.5, given the last release was in March 2023.
- Whether gzip-compressed lease file support (mentioned in the description) is fully tested and maintained.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesix |
| Maintenance | Dormant 1,244 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 194,267 / month, #9,840 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development |
Evidence: isc_dhcp_leases-0.10.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dhcp lease file parser”
- isc-dhcp-leasesReads and parses ISC DHCP server lease files (dhcpd.leases) for both…
- aiodhcpwatcherWatches for DHCP packets on the network using asyncio, allowing you…
- aiopnsenseAn async Python client library that wraps OPNsense REST endpoints,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also ipaddr · netaddr · iptools · IPy · ipaddress · cidr-trie · ipwhois · IP2Location · ciscoconfparse · py-radix