Git Product home page Git Product logo

pyonos's Introduction

banner

Wrapper around the IONOS DNS, Domains & SSL API

GitHub last commit GitHub release (latest by date) 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.
      • delete_dyndns: Disable Dynamic Dns.
      • put_dyndns: Update Dynamic Dns for bulk id.
      • delete_dyndns_bulk: Disable Dynamic Dns for bulk id.

About

Made with โ™ฅ by aaronlyy

License

GNU GPL v3

pyonos's People

Contributors

aaronlyy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.