Skip to main content

CI codecov GitHub Release PyPI PyPI - Downloads Buy me a coffee PayPal_Me Revolut.Me

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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nextdns 5.2.0
File Size Uploaded Provenance Actions
nextdns-5.2.0.tar.gz 19.6 kB With provenance Details for nextdns-5.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nextdns 5.2.0
File Interpreter ABI Platform Actions
nextdns-5.2.0-py3-none-any.whl Python 3 none any Details for nextdns-5.2.0-py3-none-any.whl

Total release size: 36.7 kB

Release files / nextdns-5.2.0.tar.gz

Download URL nextdns-5.2.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f1b3613eac8b65053f9c70adcd76af2a8f16bc1bb13d549cdd341bf97bcf5985
BLAKE2b-256 checksum
How to use checksums
2b559f8e5d7a759d926b722a06f9eb190796ed2bbba6bb43d75445d75b4cd814
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 Oct 19, 2026.

Transparency log

Release files / nextdns-5.2.0-py3-none-any.whl

Download URL nextdns-5.2.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aef51d4f030465aa3e3cb13d3406f20af08852644e499a895642dbf5369f2a0f
BLAKE2b-256 checksum
How to use checksums
3e3304005af351ed0572a40addc8fcb8ab0a35fb48fc899c988430234680ad74
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 Oct 19, 2026.

Transparency log

Security for nextdns 5.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nextdns-5.2.0.tar.gz

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 Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page