/httpnet

Unoffical client for the http.net Partner API

Primary LanguagePythonMIT LicenseMIT

Description

This package provides an unofficial Python client for the Partner API of http.net Internet GmbH. So far, v1 of the API (the only existing version) is supported.

Disclaimer

This package is not related to http.net Internet GmbH. So far, it is just a proof of concept and not tested in any way.

Installation

Use the package manager pip to install httpnet:

pip install git+https://github.com/eseifert/httpnet.git

Usage

First, we need a client instance:

>>> from httpnet.client import HttpNetClient
>>> AUTH_TOKEN = '<your auth token>'
>>> api = HttpNetClient(auth_token=AUTH_TOKEN)

The client provides access to all service categories in the API. They are iterable:

>>> len(api.domains)
123
>>> len(api.dns_zones)
123

Almost all services provide a common query interface:

>>> from httpnet.domain import ContactType
>>> persons = api.domain_contacts.find(ContactType=str(ContactType.PERSON))
>>> len(persons)
42

Contributing

Pull requests are always welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

By submitting a pull request for this project, you agree to license your contribution under the MIT license to this project.