TransIP API Connector
Project description
===========
TransIP API
===========
.. image:: https://travis-ci.org/benkonrath/transip-api.png?branch=develop
:align: right
:target: https://travis-ci.org/benkonrath/transip-api
This library aims to implement the `TransIP API`_ in Python.
Quick Start
===========
Prerequisite
------------
* Make sure you have an account at TransIP_
* *Enable* the API (https://www.transip.nl/cp/mijn-account/#api)
* Add your IP.
* Generate key-pairs
+ Copy-paste the key into a file.
+ Reformat the key ``$ openssl rsa -in input.key -out decrypted_key``
+ put decrypted key next to this readme
Setup
-----
.. code-block::
$ python setup.py install
Example
-------
The command-line interpreter doesn't do much yet. By default it does a
getDomainNames() call, but with the '-u' option it's also possible to add or
update DNS records. When calling it with '-h', it will show all available options.
.. code-block::
$ transip-api
[example.com, example.org, example.net]
$ transip-api -h
usage: transip-api [-h] [-l LOGINNAME] [-s] [-a] [-u] [-d]
[--domain-name DOMAIN_NAME] [--entry-name ENTRY_NAME]
[--entry-expire ENTRY_EXPIRE] [--entry-type ENTRY_TYPE]
[--entry-content ENTRY_CONTENT] [--api-key PRIVATE_KEY_FILE]
optional arguments:
-h, --help show this help message and exit
-l LOGINNAME, --login-name LOGINNAME
TransIP username
-s, --show-dns-entries
show all DNS entries for a domain
-a, --add-dns-entry add an entry in the DNS
-u, --update-dns-entry
update an entry in the DNS
-d, --delete-dns-entry
delete an entry in the DNS
--domain-name DOMAIN_NAME
domain name to use
--entry-name ENTRY_NAME
name of the DNS entry
--entry-expire ENTRY_EXPIRE
expire time of the DNS entry
--entry-type ENTRY_TYPE
type of the DNS entry
--entry-content ENTRY_CONTENT
content of the DNS entry
--api-key PRIVATE_KEY_FILE
TransIP private key
Example of adding/updating a record:
.. code-block::
$ transip-api -l githubuser -u --api-key privatekey --domain-name example.com --entry-name testentry --entry-expire 86400 --entry-type A --entry-content 127.0.0.1
Request finished successfully.
Documentation
=============
Further documentation can be found in the ``docs`` directory, although this is
not filled in yet.
.. _virtualenv: http://virtualenv.org/
.. _TransIP: https://www.transip.nl/cp/
.. _`TransIP API`: https://www.transip.eu/transip/api/
FAQ
===
Question:
When using the library I get SSL errors such as:
.. code-block::
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 unrecognized name>
Answer:
The `suds` library has fairly limited SSL support which is dependent on the Python version, to work around this the `suds_requests` library can be used which replaces `urllib2` with the `requests` library. Additionally the `requests` library automatically pools connections which makes the library slightly faster to use.
To install:
.. code-block::
pip install suds_requests
TransIP API
===========
.. image:: https://travis-ci.org/benkonrath/transip-api.png?branch=develop
:align: right
:target: https://travis-ci.org/benkonrath/transip-api
This library aims to implement the `TransIP API`_ in Python.
Quick Start
===========
Prerequisite
------------
* Make sure you have an account at TransIP_
* *Enable* the API (https://www.transip.nl/cp/mijn-account/#api)
* Add your IP.
* Generate key-pairs
+ Copy-paste the key into a file.
+ Reformat the key ``$ openssl rsa -in input.key -out decrypted_key``
+ put decrypted key next to this readme
Setup
-----
.. code-block::
$ python setup.py install
Example
-------
The command-line interpreter doesn't do much yet. By default it does a
getDomainNames() call, but with the '-u' option it's also possible to add or
update DNS records. When calling it with '-h', it will show all available options.
.. code-block::
$ transip-api
[example.com, example.org, example.net]
$ transip-api -h
usage: transip-api [-h] [-l LOGINNAME] [-s] [-a] [-u] [-d]
[--domain-name DOMAIN_NAME] [--entry-name ENTRY_NAME]
[--entry-expire ENTRY_EXPIRE] [--entry-type ENTRY_TYPE]
[--entry-content ENTRY_CONTENT] [--api-key PRIVATE_KEY_FILE]
optional arguments:
-h, --help show this help message and exit
-l LOGINNAME, --login-name LOGINNAME
TransIP username
-s, --show-dns-entries
show all DNS entries for a domain
-a, --add-dns-entry add an entry in the DNS
-u, --update-dns-entry
update an entry in the DNS
-d, --delete-dns-entry
delete an entry in the DNS
--domain-name DOMAIN_NAME
domain name to use
--entry-name ENTRY_NAME
name of the DNS entry
--entry-expire ENTRY_EXPIRE
expire time of the DNS entry
--entry-type ENTRY_TYPE
type of the DNS entry
--entry-content ENTRY_CONTENT
content of the DNS entry
--api-key PRIVATE_KEY_FILE
TransIP private key
Example of adding/updating a record:
.. code-block::
$ transip-api -l githubuser -u --api-key privatekey --domain-name example.com --entry-name testentry --entry-expire 86400 --entry-type A --entry-content 127.0.0.1
Request finished successfully.
Documentation
=============
Further documentation can be found in the ``docs`` directory, although this is
not filled in yet.
.. _virtualenv: http://virtualenv.org/
.. _TransIP: https://www.transip.nl/cp/
.. _`TransIP API`: https://www.transip.eu/transip/api/
FAQ
===
Question:
When using the library I get SSL errors such as:
.. code-block::
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 unrecognized name>
Answer:
The `suds` library has fairly limited SSL support which is dependent on the Python version, to work around this the `suds_requests` library can be used which replaces `urllib2` with the `requests` library. Additionally the `requests` library automatically pools connections which makes the library slightly faster to use.
To install:
.. code-block::
pip install suds_requests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
transip-0.4.1.tar.gz
(11.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file transip-0.4.1.tar.gz.
File metadata
- Download URL: transip-0.4.1.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91baa6a71a61f764ba043bb507749344d7bdbce116339f74ff876754f095ccfc
|
|
| MD5 |
3f6b6bce5983ee9caf19429321c44d86
|
|
| BLAKE2b-256 |
7689b07e577a73df61ee4cd4df0dcf5d31738752292e428df4f3c3c3778d8308
|
File details
Details for the file transip-0.4.1-py2.py3-none-any.whl.
File metadata
- Download URL: transip-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fbe8f7634e8e019f7f340bea4b2f3957542b8a4a2c04b76296d8641aad73167
|
|
| MD5 |
8e2de5a191636a36b30a243edc2f1cd4
|
|
| BLAKE2b-256 |
f203df610161ac43347cc577306c60dd5dd65dea192d78ad05a2f45758a52342
|