Skip to content

Built for Big DNS. A Python SDK for the DNSMin API service used to manage the PowerDNS server suite.

License

Notifications You must be signed in to change notification settings

dnsmin/dnsmin-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DNSMin Python SDK

DNSMin Python SDK provides a convenient way to consume the features of the DNSMin API

Branch Status

Branch CodeQL Build
dev CodeQL Build
0.1.0 CodeQL Build

Table of Contents

TL;DR

With this SDK, you can easily access and manipulate your DNSMin data and configuration.

from dnsmin import ApiClient

# Define your API URL and client credentials
base_url = 'https://your.dnsmin-installation.com/api'
token_url = 'https://your.dnsmin-installation.com/api/token'
client_id = 'CLIENT-UUID-HERE'
client_secret = 'CLIENT-SECRET-HERE'

# Instantiate API client with appropriate configuration
api_client = ApiClient(base_url=base_url, token_url=token_url, client_id=client_id, client_secret=client_secret)

# Retrieve all users
users = api_client.auth.users.list()

# Retrieve all authoritative zones available to the given client credentials
authoritative_zones = api_client.zones.authoritative.list()

Looking for an asynchronous version? Here you go:

from dnsmin import AsyncApiClient

# Define your API URL and client credentials
base_url = 'https://your.dnsmin-installation.com/api'
token_url = 'https://your.dnsmin-installation.com/api/token'
client_id = 'CLIENT-UUID-HERE'
client_secret = 'CLIENT-SECRET-HERE'

# Instantiate API client with appropriate configuration
api_client = AsyncApiClient(base_url=base_url, token_url=token_url, client_id=client_id, client_secret=client_secret)

# Retrieve all users
users = await api_client.auth.users.list()

# Retrieve all authoritative zones available to the given client credentials
authoritative_zones = await api_client.zones.authoritative.list()

For a much better explanation of all the features you see here, please see the Feature Documentation.

Installation

Notice! This requires Python 3.12+

To install the Python package, run the following command in your Python environment:

python3 -m pip install dnsmin

The PyPi package is automatically built and published to the PyPi repository for each release. If you want to install a release from the source, run the following commands in your terminal:

python3 -m pip install --upgrade git+
git clone https://github.com/dnsmin/dnsmin-sdk-python.git
cd dnsmin-sdk-python
git checkout tags/v<release-version> -b release/<release-version>
python3 -m pip install .

Project Documentation

Project Information

For information about the project such as feature planning, the roadmap, and milestones, then please see the Project Information section of the wiki.

Contributing

If you're interested in participating in the project design discussions, or you want to actively submit work to the project then you should check out the Contribution Guide!

Security Policy

Please see our Security Policy.

Support Policy

Please see our Support Policy.

Looking to chat with someone? Join our Discord Server.

Code of Conduct

Please see our Code of Conduct.

License

This project is released under the MIT license. For additional information, see the full license.

Donate

Like my work?

Buy Me A Coffee

Want to sponsor me? Please visit my organization's sponsorship page.

About

Built for Big DNS. A Python SDK for the DNSMin API service used to manage the PowerDNS server suite.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages