Skip to main content

WEDOS WAPI client

Project description

wedos-wapi-client

Wrapper around WEDOS WAPI

(Note: WAPI must be enabled for your account and your IP must be authorized to access it.)

Example usage for DNS:

from wedos_wapi_client import WapiClient

old_ip = "1.2.3.4"
new_ip = "10.20.30.40"

wapi = WapiClient(user="your-email@domain.tld", password="secret-password")

for domain in wapi.domains_list().data["domain"].values():
    for row in wapi.dns_rows_list(domain["name"]).data["row"]:
        if row["rdtype"] == "A" and row["rdata"] == old_ip:
            wapi.dns_row_update(domain=domain["name"], row_id=row["ID"], rdata=new_ip)
    wapi.dns_domain_commit(name=domain["name"])

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

wedos_wapi_client-0.1.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

wedos_wapi_client-0.1.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

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