Skip to main content

A dead simple Python interface to the Alwaysdata API.

Project description


A dead simple Python interface to the Alwaysdata API

PyPI version


pip install alwaysdata_api

(Use flag --user if you can't install globally.)


If you store your API key and account name in the ALWAYSDATA_API_KEY and ALWAYSDATA_ACCOUNT environment variables, the following example works out of the box:

from alwaysdata_api import Domain
# ''

Alternatively, you can provide the authentication via code. The above example then needs to be expanded to include the extra configuration:

from alwaysdata_api import Auth, Domain
auth = Auth('account_name', 'api_key')
Domain.list(name='paul', auth=auth)[0].name
# ''

See for more examples.

Every resources in the API docs has a class in this package (such as Domain, Record, Mailbox, etc) and all resources share the same set of methods. To give you a quick idea:

  • Resource.get(id) retrieves the instance.
  • Resource.list(**query_kwargs) finds and returns the list of resources.
  • submits the resource instance to the server to be created.
  • res.put() updates the instance on the server.
  •, res2).patch() sends the changes from res1 to res2 to the server.
  • res.delete() deletes it.


Although it is a simple bit of code, surely it can be improved. Contributions are very welcome. Just send a PR (please include tests). It would be equally great to have some instructions in this repo Wiki (I would have to find out how that works though :-))

Code style follows PEP accurately and uses Google style docstrings.

For testing:

python -m unittest



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.4.tar.gz (12.0 kB view hashes)

Uploaded source

Built Distribution

alwaysdata_api-0.9.4-py3-none-any.whl (12.9 kB view hashes)

Uploaded py3

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