Skip to main content

Wrapper around the IONOS DNS, Domains & SSL API.

Project description

banner

Wrapper around the IONOS DNS, Domains & SSL API

GitHub release (latest by date) GitHub last commit GitHub

Installation

Pyonos is a PyPi package and can be installed using pip.

pip install pyonos

Features

  • Full DNS, Domains & SSL API coverage
  • Top-Level methods for easier use of the core methods
  • DynDns Update Function

Quickstart

IONOS exposes 3 different API's.

  • Dns
  • Domains
  • Ssl

Every API has its corresponding & same name class that can be imported from pyonos. Every class needs to be authenticated using a prefix and a secret.

Similarly, every API endpoint has its own corresponding method. Methods always return a PyonosResponse object which has two properties:

  • .status_code: The http status code returned
  • .json: the json response (if not available: None)

DNS API

Full IONOS DNS Documentation

Start by importing the Dns class from pyonos.

from pyonos import Dns

Now we need to authenticate with a prefix and a secret.

from pyonos import Dns

dns = Dns("abc", "def")

Now we use the .get_zones() method to get all zones available. Because PyonosResponse overwrites it's _str_ method, we can just print the response.

from pyonos import Dns

dns = Dns("abc", "def")
response = dns.get_zones()

print(response)

# get single properties like this:
#   response.status_code
#   response.json

List of all available methods/endpoints

Method names are a combination of the http method used and their category.

  • Dns (Official API Docs)
    • Zones
      • get_zones: Returns list of customer zones.
      • get_zone: Returns a customer zone.
      • patch_zone: Replaces all records of the same name and type with the ones provided.
      • put_zone: Replaces all records in the zone with the ones provided.
    • Records
      • post_records: Creates records for a customer zone.
      • get_record: Returns the record from the customer zone with the mentioned id.
      • delete_record: Delete a record from the customer zone.
      • put_record: Update a record from the customer zone.
    • DynDns
      • post_dyndns(): Activate dyndns for a group of domains.

About

Made with ♥ by aaronlyy

License

GNU GPL v3

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

pyonos-0.2.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

pyonos-0.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file pyonos-0.2.0.tar.gz.

File metadata

  • Download URL: pyonos-0.2.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pyonos-0.2.0.tar.gz
Algorithm Hash digest
SHA256 78cfba1bdc3946cd6816f50b5e3336804e17559331dadce5b9d15708e4527083
MD5 cb6b759706157f3bdc44569f4aae6b7f
BLAKE2b-256 4d167925170365f9cff37a88f9713d4474c2ef5750d13134a262c737dc265273

See more details on using hashes here.

File details

Details for the file pyonos-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyonos-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pyonos-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84c6eae113caa4f420264c2067390917ded554ab856787ae73fa45bdbe3128a8
MD5 ededa492048cb2d21adbda09e3ea1f12
BLAKE2b-256 222aa796bfc8e8c8b3dab9f6c4bb9d10ca176dcc141421269d53bb5ded2d8e46

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