# wedos-wapi-client
Wrapper around [WEDOS WAPI](https://kb.wedos.com/kategorie/wapi-api-interface/)
(Note: WAPI must be enabled for your account and your IP must be authorized to access it.)
Example usage for DNS:
```python
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"])
```
Raw data
{
"_id": null,
"home_page": "https://github.com/qbsoftware/wedos-wapi-client",
"name": "wedos-wapi-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Jakub Dor\u0148\u00e1k",
"author_email": "jakub.dornak@qbsoftware.cz",
"download_url": "https://files.pythonhosted.org/packages/3b/a1/42bb46bcbda8b3d3f1d6fa4ace5ca866f87a255fc68083b29ae429eba3c9/wedos_wapi_client-0.1.1.tar.gz",
"platform": null,
"description": "# wedos-wapi-client\n\nWrapper around [WEDOS WAPI](https://kb.wedos.com/kategorie/wapi-api-interface/)\n\n(Note: WAPI must be enabled for your account and your IP must be authorized to access it.)\n\nExample usage for DNS:\n\n```python\nfrom wedos_wapi_client import WapiClient\n\nold_ip = \"1.2.3.4\"\nnew_ip = \"10.20.30.40\"\n\nwapi = WapiClient(user=\"your-email@domain.tld\", password=\"secret-password\")\n\nfor domain in wapi.domains_list().data[\"domain\"].values():\n for row in wapi.dns_rows_list(domain[\"name\"]).data[\"row\"]:\n if row[\"rdtype\"] == \"A\" and row[\"rdata\"] == old_ip:\n wapi.dns_row_update(domain=domain[\"name\"], row_id=row[\"ID\"], rdata=new_ip)\n wapi.dns_domain_commit(name=domain[\"name\"])\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "WEDOS WAPI client",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/qbsoftware/wedos-wapi-client",
"Repository": "https://github.com/qbsoftware/wedos-wapi-client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "68c513f88a63ece801240dcfed3e627f7ba93f0c09550ce679bb92a8417489e0",
"md5": "36d7ab60d4abb09eb13f08bedd4bf6ce",
"sha256": "8c97609330a92d66dbbedbd764ee94af80afbc17708223c73fa3a62c1934b266"
},
"downloads": -1,
"filename": "wedos_wapi_client-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36d7ab60d4abb09eb13f08bedd4bf6ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 2764,
"upload_time": "2024-01-18T12:27:01",
"upload_time_iso_8601": "2024-01-18T12:27:01.959483Z",
"url": "https://files.pythonhosted.org/packages/68/c5/13f88a63ece801240dcfed3e627f7ba93f0c09550ce679bb92a8417489e0/wedos_wapi_client-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3ba142bb46bcbda8b3d3f1d6fa4ace5ca866f87a255fc68083b29ae429eba3c9",
"md5": "83b46badfb4d161f31bf803b2eaba6eb",
"sha256": "fc5aba04581cc5d98a165f683a282e4aa741a3a175c8d7671173e8d18bbfdd00"
},
"downloads": -1,
"filename": "wedos_wapi_client-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "83b46badfb4d161f31bf803b2eaba6eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 2536,
"upload_time": "2024-01-18T12:27:04",
"upload_time_iso_8601": "2024-01-18T12:27:04.016983Z",
"url": "https://files.pythonhosted.org/packages/3b/a1/42bb46bcbda8b3d3f1d6fa4ace5ca866f87a255fc68083b29ae429eba3c9/wedos_wapi_client-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-18 12:27:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qbsoftware",
"github_project": "wedos-wapi-client",
"github_not_found": true,
"lcname": "wedos-wapi-client"
}