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.3.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.3.0
File Size Uploaded Provenance Actions
nextdns-5.3.0.tar.gz 19.8 kB With provenance Details for nextdns-5.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 37.1 kB

Release files / nextdns-5.3.0.tar.gz

Download URL nextdns-5.3.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b0b5807498d6cd8c3bb6f65a25691fa53f464bdef7003bc8f205cddcfb6cbf0
BLAKE2b-256 checksum
How to use checksums
b91192f67d57aee8caa6336c27f5931d9ac88c9b277a3e563e06b9de7ddfc2a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

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

Download URL nextdns-5.3.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b29c787cfdba6546260cf8bc6e5ed8ec9007813e9ab7eb3ae898022f198a0d30
BLAKE2b-256 checksum
How to use checksums
be05a821d74107d5b01ecdef822dc974e79b7c71eb099351d52d1ea94ca16db5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Security for nextdns 5.3.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.3.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 Nov 22, 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