Skip to main content

A dead simple Python interface to the Alwaysdata API.

Project description

alwaysdata_api provides a dead simple Python interface to the Alwaysdata API (at https://api.alwaysdata.com/).

>>> from alwaysdata_api import Config, Domain, Record
>>> auth = ('MY_API_KEY account=MY_ACCOUNT', '')
>>> config = Config(auth)
>>> # List all domains.
>>> domains = Domain.list(config=config)
>>> domains
>>> # Find nameserver records in the DNS.
>>> domain = domains[0]
>>> records = Record.list(domain=domain.id, type='NS', config=config)
>>> records
>>> # Print the WHOIS information.
>>> print(domain.whois())

Config is a namedtuple with the authentication credentials and server root URL. By default, it reads the API key and account name from the environment variables ALWAYSDATA_API_KEY and ALWAYSDATA_ACCOUNT respectively. If these are set, all auth and config can be dropped from the above example.

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

alwaysdata_api-0.9.1.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

alwaysdata_api-0.9.1-py2.py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 2 Python 3

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