dynami
dynami is a Python package that provides a simple interface for managing DNS records through various providers. Currently, it supports Hetzner as a DNS provider, with more providers to come in future updates.
Installation
You can install dynami via pip:
pip install dynami
Usage
To use dynami, you must first instantiate a provider and client. Here's an example for Hetzner:
from dynami.provider import Hetzner
from dynami.ext import Client
api_key = "YOUR_API_KEY"
zone = "yourdomain.local"
provider = Hetzner(api_key=api_key, zone=zone)
client = Client(provider)
result = client.set(record="www", type="A", value="0.0.0.0")
if result.status_code < 299 and result.status_code > 199:
print("Success!")
else:
print("Failed!")
This will create an A record for the www subdomain pointing to 0.0.0.0.
Providers
Currently, dynami only supports Hetzner as a DNS provider. More providers will be added in future updates.
- Hetzner
- Amazon Web Services (AWS)
- Cloudflare
- DigitalOcean
- Google Cloud Platform (GCP)
- Microsoft Azure
Provider configuration
To configure a provider, pass the provider-specific options to its constructor. For Hetzner, these options are:
api_key: your Hetzner DNS API keyzone: the name of the DNS zone you want to manage
Client methods
Client provides the following methods for managing DNS records:
set: creates or updates a DNS record
Release files for dynami 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dynami-1.0.7.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dynami-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / dynami-1.0.7.tar.gz
| Download URL | dynami-1.0.7.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a44daf8cfc2cbcd4a8b1f1debf7040a88bf12ccc6dcff83803eba6721263d62c
|
|
BLAKE2b-256 checksum How to use checksums |
cb1a3b3e267a35ee73e5a514593491877807690ab8daab661c6cc0712753b8da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / dynami-1.0.7-py3-none-any.whl
| Download URL | dynami-1.0.7-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de7af4e86f96c73f6f8c2d41e119dac3f020936c929ba968a99f8050cd96bbdb
|
|
BLAKE2b-256 checksum How to use checksums |
7c3632f9962c0a3c16d04ac03dacb1f85abc36c4e16506fcb9180ae6440f40ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|