nextdns
Python wrapper for NextDNS API.
To generate an API key you need a NextDNS account, which you can create using this referral.
How to use package
"""Example of usage."""
import asyncio
import logging
from aiohttp import ClientSession
from nextdns import ApiError, InvalidApiKeyError, NextDns
API_KEY = "xxx"
logging.basicConfig(level=logging.DEBUG)
async def main():
"""Main function."""
async with ClientSession() as websession:
try:
nextdns = await NextDns.create(websession, API_KEY)
profile_id, profile_name = nextdns.profiles[2]
profile = await nextdns.get_profile(profile_id)
status = await nextdns.get_analytics_status(profile_id)
dnssec = await nextdns.get_analytics_dnssec(profile_id)
encryption = await nextdns.get_analytics_encryption(profile_id)
ip_versions = await nextdns.get_analytics_ip_versions(profile_id)
protocols = await nextdns.get_analytics_protocols(profile_id)
except InvalidApiKeyError:
print("Invalid API Key")
except ApiError as error:
print(f"API Error: {error.status}")
else:
print(f"Profile: {profile_name} ({profile_id})")
print(profile)
print(status)
print(dnssec)
print(encryption)
print(ip_versions)
print(protocols)
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to create a dev environment
git clone https://github.com/bieniu/nextdns.git
cd nextdns
./scripts/setup-local-env.sh
Metadata
Release files for nextdns 5.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nextdns-5.1.0.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nextdns-5.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.8 kB
Release files / nextdns-5.1.0.tar.gz
| Download URL | nextdns-5.1.0.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db75555f1d2de068ce4c5d56469680e6d0c6088bc1183918e4ad949f667158cd
|
|
BLAKE2b-256 checksum How to use checksums |
8b5de72f99ef2137dce07b11ffcbf6c9055165209f8115ebd9021a758ff7f3e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / nextdns-5.1.0-py3-none-any.whl
| Download URL | nextdns-5.1.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c6489e764f4ed5a1982ec7ca33f63bcfcb8e75b63a30a57c33cabac9eb40e82
|
|
BLAKE2b-256 checksum How to use checksums |
66d4984d43ed74e3ccb0afb7b49ea1ffa75b69cf3d309d97d054a1432b66ca8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency log