Skip to content
A Python3.6+ implementation for the TransIP REST API
Python Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


TransIP Python 3 REST API client

This module implements a Python 3 client for the REST API of (A dutch service provider


TransIP offers a REST API to query and modify services. TransIP hosts excellent documentation on which this code is built.

The module was built by in 2020.


This project is documented at This README is just a short introduction.

Getting it working

To work with the REST API, there are a few steps to take:

  • have an account at TransIP

  • turn API on (log in and enable it on the api page)

  • Generate a keypair on that same page; copy the Private Key that is shown once (save it in a file called privatekey.txt

  • whitelist the IP address where the client is running

  • convert the private key to an RSA private key (you need openssl tools installed):

    openssl rsa -in privatekey.txt -out rsaprivatekey.txt
  • this RSA private key is needed to be able to authenticate to the API


With the file rsaprivatekey.txt in current directory:

from transip_rest_client import TransipRestClient

with open('rsaprivatekey.txt', 'r') as f:
    my_RSA_key =
client = TransipRestClient(user='myaccountname', rsaprivate_key=my_RSA_key)
client.post_dns_entry(domain='', name='www', type='A', content='')

getting tests to work

Since TransIP does not provide a test environment nor a key to test with, the unittests depend on your credentials and are not supplied. The Unittests expect a file to be present in the test directory with credentials. It should look like this:

transipaccount = 'myaccount'
RSAkey = '-----BEGIN RSA PRIVATE KEY-----\n<myRSAKey>\n-----END RSA PRIVATE KEY-----'
testdomain = ''

The tests do not (yet) provide a stub for offline-testing


As of january 2020, the client is not complete; only DNS features have been implemented. Other functionality can (and will) be added to

You can’t perform that action at this time.