Python client library for the Subreg.cz SOAP API. Python port of php-spojenet-subreg.
pip install subreg-clientor, on Debian/Ubuntu:
apt install python3-subreg-clientConfigure via environment variables:
SUBREG_LOCATION=https://soap.subreg.cz/cmd.php
SUBREG_URI=https://soap.subreg.cz/soap
SUBREG_LOGIN=spojenetapi#spoje.net
SUBREG_PASSWORD=your-passwordor pass a config dict directly to the constructor (takes priority over env vars):
from subreg import Client
client = Client({
"location": "https://ote-soap.subreg.cz/cmd.php",
"uri": "https://ote-soap.subreg.cz/soap",
"login": "php-subreg",
"password": "661a2725fb",
})
print(client.check_domain("example.cz"))
print(client.domains_list())subreg.Client talks to soap.subreg.cz over classic SOAP 1.1 RPC/encoded
requests (Apache Map/Array type encoding), which is what the service
actually speaks — not modern WSDL/document-style SOAP, so the request/response
envelopes are built and parsed directly (subreg/_soap.py) rather than via a
generic SOAP toolkit.
Three classes are provided, mirroring the PHP library:
subreg.Client— login/session handling, genericcall(), and a handful of convenience methods (check_domain,domains_list,pricelist, ...).subreg.Commands— one method per remaining Subreg API command.subreg.Orders— one method perMake_Orderorder type (create_domain,transfer_domain,renew_domain, ...).
Errors reported by the API (status: error) raise subreg.SubregError.