Skip to main content

TransIP API Connector

Project description

https://travis-ci.org/benkonrath/transip-api.png?branch=develop

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

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

$ 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]

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

Example of adding/updating a record:

$ transip-api -l githubuser -u --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.

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

transip-0.3.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transip-0.3.0-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file transip-0.3.0.tar.gz.

File metadata

  • Download URL: transip-0.3.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for transip-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d9929afe978c1780b9ed075e63b131791e70ccfa90bb067b256e6651bed29ae4
MD5 25b6408515526c6b8eab81075b77372e
BLAKE2b-256 0d32a97f1a6a277d5e0771eda274046aea12161226bf1de0cf53d28e6f4d7566

See more details on using hashes here.

File details

Details for the file transip-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for transip-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 70bd2b3b9e318b46bdb20d714f427e9a466f7a385e39d1ed0d92785676e4b3df
MD5 1ca6835ca09e053f45fa0eb98638dc9b
BLAKE2b-256 5f57949f6929cbaf9413f15074c892dad8181bef8c47520cd5060eefac812d25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page