Skip to main content

Convert Kea DHCP leases to JSON format

Project description

Kea Leases to JSON

A Python tool to convert ISC Kea DHCP leases files to JSON format.
Supports both IPv4 and IPv6 leases. Includes a directory watcher for real-time conversion.

Features

  • Converts Kea leases CSV files to JSON
  • Handles both IPv4 and IPv6 addresses
  • Watches a directory for changes and updates the JSON output automatically
  • Command-line interface

Installation

You can install the latest release from PyPI:

pip install kea-leases-to-json

Or, to install from source:

git clone https://github.com/yourusername/kea-leases-to-json.git
cd kea-leases-to-json
pip install .

Usage

After installation, you can use the command-line tool:

kea-leases-to-json --source /path/to/kea/leases/dir --target /path/to/output.json

Options

  • --source (required): Directory containing Kea lease CSV files
  • --target (required): Output JSON file path
  • --log-level: Logging level (default: INFO)
  • --extension: The extension for the file. Defaults to .csv
  • --single-run: As defaults, this script starts a watcher for any file change. With this parameter, runs once and exits out.

Example

kea-leases-to-json \
  --source ./leases \
  --target ./leases.json \
  --log-level DEBUG \
  --extension .csv \
  --single-run

License

This project is licensed under the GNU GPL v3.

Contributing

Pull requests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kea_leases_to_json-0.1.2.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kea_leases_to_json-0.1.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file kea_leases_to_json-0.1.2.tar.gz.

File metadata

  • Download URL: kea_leases_to_json-0.1.2.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for kea_leases_to_json-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ecfada90e0d4070000e7985b8971d12553779f0bbb9025d2b3481c8175af4352
MD5 4755caa1765a2686eed93d2850231011
BLAKE2b-256 1d98fce699963b6b6b24d9d28619b1bf15ab34aa5e36fac7a2f27b4e52864184

See more details on using hashes here.

File details

Details for the file kea_leases_to_json-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for kea_leases_to_json-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5c01ace480b865c8430d64bb05469a5e3bd7aea09c022f07b647840e32892b
MD5 a822218974d2ad09a08260815c1d2e3c
BLAKE2b-256 e61a13517301de0bc3e3de0fae5eea7629e0132470d646f8ea6e625160ab7bbd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page