python-transip
raw JSON → 0.6.0 verified Sat May 09 auth: no python maintenance
A wrapper for the TransIP API, providing access to manage domains, DNS, colocations, invoices, and more. Latest version 0.6.0 (November 2021), supports Python 3.6+. Maintenance mode with infrequent releases.
pip install python-transip Common errors
error ModuleNotFoundError: No module named 'transip' ↓
cause The package is installed but the import path is wrong; some users accidentally try 'import transip'.
fix
Use 'from transip import TransIP' instead of 'import transip'.
error transip.exceptions.AuthenticationError: Authentication failed: invalid access token ↓
cause Access token expired or invalid.
fix
Generate a new access token via the TransIP control panel and update it in code.
Warnings
gotcha Access tokens must be generated in the TransIP control panel and have an expiration date. If token expires, API calls will fail with authentication errors. ↓
fix Refresh token via transip._token_manager.refresh() or generate a new token from TransIP panel.
deprecated Python 3.6 is the minimum required version; older versions are not supported. The library uses f-strings and may break on 3.5. ↓
fix Upgrade Python to 3.6+ or use the older pre-0.3.0 releases.
gotcha The library 'requests' must be installed separately if not already in environment. Missing dependency leads to ImportError. ↓
fix Run 'pip install requests' or install python-transip with extras 'pip install python-transip[all]' (if available).
Imports
- TransIP wrong
import transipcorrectfrom transip import TransIP
Quickstart
from transip import TransIP
# Initialize with API credentials
transip = TransIP(
login='your_username',
access_token='your_token',
api_url='https://api.transip.nl/v6' # optional, default is v6
)
# List domains
for domain in transip.domains:
print(domain.name)