Wrapper for the TransIP API
Project description
python-transip is an Python wrapper for the TransIP REST API.
>>> import transip
# Initialize a TransIP API client
>>> client = transip.TransIP(access_token="TOKEN")
# Retrieve a list of VPSs
>>> for vps in client.vpss.list():
... print(vps)
<class 'transip.v6.objects.Vps'> => {'name': 'transipdemo-vps', 'productName': 'vps-bladevps-x1', ... }
# Retrieve a domain and list its DNS-records
>>> domain = client.domains.get('transipdemo.net')
>>> for entry in domain.dns.list():
... print(entry)
<class 'transip.v6.objects.DnsEntry'> => {'name': '*', 'expire': 300, 'type': 'A', 'content': '95.170.70.223'}
<class 'transip.v6.objects.DnsEntry'> => {'name': '@', 'expire': 300, 'type': 'A', 'content': '95.170.70.223'}
# Add a new DNS-record
>>> domain.dns.create({'name': '@', 'expire': 300, 'type': 'TXT', 'content': 'Python'})
Installing python-transip and Supported Versions
python-transip is available on PyPI:
$ python -m pip install python-transip
python-transip officially supports Python 3.6+.
Documentation
API Reference and User Guide available on Read the Docs.
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
python-transip-0.2.0.tar.gz
(30.5 kB
view hashes)
Built Distribution
Close
Hashes for python_transip-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30962691b3c24204d4863214838ef0c7093364319f62b615e6389ca70b8be5fa |
|
MD5 | c15d1c5ac7542726ad2931b5ce966cc6 |
|
BLAKE2b-256 | 130fb27466fbeb7593d491b179fba341e292d8251728d2fc252e8baf7f13840c |