Skip to main content

Python SDK for the NS1 DNS platform

Project description

Build Status Docs

NS1 Python SDK

This project is in active development.

A Python SDK for accessing NS1, the Data Driven DNS platform.

About

This package provides a python SDK for accessing the NS1 DNS platform and includes both a simple NS1 REST API wrapper as well as a higher level interface for managing zones, records, data feeds, and more. It supports synchronous and asynchronous transports.

Both python 2.7 and 3.3+ are supported. Automated tests are currently run against 2.7, 3.7, 3.8, 3.9 and 3.10.

Installation

$ pip install ns1-python

Dependencies

None, but supports different transport backends. Currently supported:

  • requests (synchronous, the default if available)
  • urllib (synchronous, the default if requests isn't available)
  • twisted (asynchronous, requires 2.7 or 3.5+)

Other transports are easy to add, see transport

Examples

See the examples directory

Documentation

If you don't yet have an NS1 account, signup here (free)

You'll need an API Key. To create one, login to the portal and click on the Account button in the top right. Select Settings & Users, then add a new API Key at the bottom.

Tests

Unit tests use pytest (pip install pytest). 2.7 also requires mock to be installed (pip install mock).

Tests should, of course, run and pass under python 2 and 3. We use tox to automate test runs and virtualenv setup, see tox.ini for config.

Contributions

Pull Requests and issues are welcome. See the NS1 Contribution Guidelines for more information.

Editing the docs

You can create or edit NS1-python documentation by downloading the repo onto your machine and using an editor such as VSCode.

Creating Pull Requests

  1. When you're ready to submit your changes, add a descriptive title and comments to summarize the changes made.
  2. Select Create a new branch for this commit and start a pull request.
  3. Check the Propose file change button.
  4. Scroll down to compare changes with the original document.
  5. Select Create pull request.

Our CI process will lint and check for formatting issues with flake8 and black. It is suggested to run these checks prior to submitting a pull request and fix any issues:

pip install flake8 black
flake8 . --count --show-source --statistics --extend-ignore=E501
black . --check -l 79 --diff

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ns1-python-0.22.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

ns1_python-0.22.0-py2.py3-none-any.whl (41.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ns1-python-0.22.0.tar.gz.

File metadata

  • Download URL: ns1-python-0.22.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for ns1-python-0.22.0.tar.gz
Algorithm Hash digest
SHA256 1a3f430e0961e527373267cb8567f19fa074106f5daf30e9786076611c4a9887
MD5 47e525fa01cfc276c3cef7682309b02e
BLAKE2b-256 973df5c75e0cc915dd0e54eef5e4e3e2550bef2b1a78f654eb545396bb88b827

See more details on using hashes here.

File details

Details for the file ns1_python-0.22.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ns1_python-0.22.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00ec3e09582f186bebe708329ec6df93c638f9170fd0bbc6a050c394479d3f94
MD5 8ecb7cbd84cbaaac92ab15301908ee8e
BLAKE2b-256 d4afc42a9689bdc28481262a341ba6a205b8f71b7b884326c3ee6a05e0cc9e42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page