Skip to main content
===========
TransIP API
===========

|Build Status| |Docs Status|

.. |Build Status| image:: https://travis-ci.org/benkonrath/transip-api.svg?branch=master
:target: https://travis-ci.org/benkonrath/transip-api
:alt: Build Status
.. |Docs Status| image:: https://readthedocs.org/projects/transip-api/badge/?version=latest
:target: https://transip-api.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

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)
* Whitelist your IP.
* Generate a new key-pair.
+ Copy-paste the private key into a file.
+ Either reformat the key to PKCS#1 format using ``$ openssl rsa -in input.key -out decrypted_key`` or install cryptography using ``$ pip install cryptography``.
+ Put the private key in a file called ``decrypted_key`` beside this ``README.rst`` file.

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, or on https://transip-api.readthedocs.io/en/latest/.

.. _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


Metadata

Release files for transip 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transip 1.0.0
File Size Uploaded Provenance Actions
transip-1.0.0.tar.gz 12.5 kB Without provenance Details for transip-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transip 1.0.0
File Interpreter ABI Platform Actions
transip-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for transip-1.0.0-py2.py3-none-any.whl

Total release size: 29.9 kB

Release files / transip-1.0.0.tar.gz

Download URL transip-1.0.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ef435d1a2fb099387f158c07fe273745bea08a11a99d9ac7bdd7414ef00da808
BLAKE2b-256 checksum
How to use checksums
e158893c8a1fd0938d4ed287a0c4b3ae8e8e532278d3db7006a07a096593e300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / transip-1.0.0-py2.py3-none-any.whl

Download URL transip-1.0.0-py2.py3-none-any.whl
Size 17.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2c22e8662f7de037ff2cf350662b6295675ebee2ecb51200216828ae408aca21
BLAKE2b-256 checksum
How to use checksums
f1c01c366bdf73f39416095574a596e7c7ec8a6d92b515fde3c071d63bb48d9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Security for transip 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page