Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

sendmux-management

PyPI version Python versions PyPI downloads Licence

Generated Python client for the Sendmux Management API.

Documentation

Requirements

  • Python 3.10 or newer.
  • A root Sendmux API key with the smx_root_* prefix.

Installation

pip install sendmux-management

Usage

import os

from sendmux_management import DomainsApi, create_management_client

client = create_management_client(api_key=os.environ["SENDMUX_MANAGEMENT_API_KEY"])
api = DomainsApi(client)

domains = api.management_list_domains(limit=25)

for domain in domains.data:
    print(domain.id, domain.domain)

The package exports every generated Management model and API class plus:

  • create_management_client
  • configure_management
  • SendmuxManagementApiClient

Conditional requests

Generated methods expose ETag parameters directly when the API operation supports them.

import os

from sendmux_management import DomainsApi, create_management_client

client = create_management_client(api_key=os.environ["SENDMUX_MANAGEMENT_API_KEY"])
api = DomainsApi(client)

domain = api.management_get_domain(
    public_id="mdom_123",
    if_none_match='W/"etag"',
)

print(domain.data)

Support

Open an issue in Sendmux/sendmux-sdk with the package name, version, and request ID from any API error.

Licence

MIT. See the licence file.