Official Python client for IPForge (IPAM that pushes DNS/DHCP config).
Project description
ipforge-client
Official Python client for IPForge —
IPAM that pushes DNS/DHCP config. Sync, typed, one dependency (requests).
Install
pip install ipforge-client
Quickstart
from ipforge_client import IPForge
client = IPForge("https://ipforge.example.com", token="ipfg_...")
# or rely on IPFORGE_URL / IPFORGE_TOKEN env vars: IPForge()
# List (auto-paginates across pages, yields typed models)
for addr in client.addresses.list(subnet_id=3, status="assigned"):
print(addr.address, addr.hostname)
# Single page with total
page = client.addresses.list_page(limit=50, offset=0, subnet_id=3)
print(page.total, [a.address for a in page])
# Allocate the next free IP, registering DNS
result = client.subnets.allocate(3, hostname="web-01", register_dns=True, dns_zone="example.com")
print(result["address"])
# Create a DNS record
client.dns.create_record("example.com", name="web-01", record_type="A", value=result["address"])
# Audit log (cursor-paginated)
for entry in client.audit.list(username="admin"):
print(entry.action, entry.resource_type)
Errors
All errors derive from ipforge_client.IPForgeError:
AuthError (401), ForbiddenError (403, incl. read-only token writing),
NotFoundError (404), ConflictError (409), ValidationError (422, see
.detail), ServerError (5xx), TransportError (network/timeout).
Notes
- Sync only. An async client (httpx-based) is a possible future addition.
- Models expose known fields as typed properties and keep the full payload on
.raw, so new API fields never break the client. - Targets the IPForge
/api/v1API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipforge_client-0.1.0.tar.gz.
File metadata
- Download URL: ipforge_client-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbc9b83871051d7fa66ec86c1d9a6510c597e00ea1c2188f450d22a787c1eaa
|
|
| MD5 |
c20f230cff7e47f9b9685348ba8c2349
|
|
| BLAKE2b-256 |
0f9409901de36c65da260326338581de3e72169f2a087b7e160038f3134c80b4
|
File details
Details for the file ipforge_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ipforge_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd4e6a001e5eabf254ba61db2e95610872f0ac79f25f84f6d0d06265fd1078fd
|
|
| MD5 |
9dcfe967f55e808c6d5b4da8ef32237b
|
|
| BLAKE2b-256 |
c61c25b1850c3a27d64294dfb42c12c7aa8d43b86b2b39e52a8a7ae7684cb291
|