Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python3-subreg-client

python3-subreg-client logo

Python client library for the Subreg.cz SOAP API. Python port of php-spojenet-subreg.

Installation

pip install subreg-client

or, on Debian/Ubuntu:

apt install python3-subreg-client

Configuration

Configure 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-password

or 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())

How it works

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, generic call(), and a handful of convenience methods (check_domain, domains_list, pricelist, ...).
  • subreg.Commands — one method per remaining Subreg API command.
  • subreg.Orders — one method per Make_Order order type (create_domain, transfer_domain, renew_domain, ...).

Errors reported by the API (status: error) raise subreg.SubregError.

About

Python client library for the soap.subreg.cz SOAP API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages