{ "info": { "author": "Dominic S.", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Unofficial Hosting.de API Client and Certbot DNS Auth Plugin\n\nPython3 library for accessing the hosting.de dns api.\n\n[![PyPI version](https://badge.fury.io/py/no-hostingde-api.svg)](https://badge.fury.io/py/no-hostingde-api)\n\n## Disclaimer\n\nThis is an unofficial client for the hosting.de API. I have only implemented very few functions that I need for another hobby project. I am not in any way connected to hosting.de other then being a paying customer.\n\nI'd be happy to give up this library for an official and supported library.\n\nI have built this library to use it for ddns scripts and let's encrypt wildcard certificate requests.\n\nValidation and sanitizing of any inputs is expected to be done at higher level.\n\n**USE THIS LIBRARY AT YOUR OWN RISK, DO NOT USE IN PRODUCTION. DO NOT EXPECT SUPPORT.**\n\n## Features\n\n- certbot dns authenticator plugin\n- implemented all hosting.de api zone and record functions\n- retry on busy api objects\n- custom dns api helper functions\n- dns api filter helpers\n- dns api helpers\n\n## Certbot DNS Authenticator Plugin\n\nIntroduced in version 0.3.0, this certbot dns authenticator plugin allows certificates\nto be requested from letsencrypt for domains hosted by hosting.de.\n\nThis allows to create certificates for hosts that may not be reachable for webroot authentication,\nor that require dns validation. e.g.: internal servers with private dns, wildcard certificates.\n\n### Configuration\n\n- credentials (path to ini file containing apikey)\n- propagation-seconds (delay between dns record creation and validation) [default: 60]\n\n**credentials.ini:**\n\n```ini credentials.ini\nno_hostingde_api:dns_hostingde_apikey=MY_SECRET_API_KEY_FOR_HOSTING_DE\n```\n\nThis is the api key configured at [hosting.de profile] - the api key needs only the permissions to list and edit zones. ( DNS_ZONES_LIST & DNS_ZONES_EDIT )\n\n### Install with certbot\n\nThe plugin is for certbot, which is not yet python3 compatible. Make sure to use python2.\n\n```sh\npip install certbot no-hostingde-api\n```\n\n### Usage\n\nAfter installation and creating the ini file containing the credentials,\nthe following command can be used to request a certificate using this plugin.\n\n```sh\ncertbot certonly \\\n -a no-hostingde-api:dns-hostingde \\\n --no-hostingde-api:dns-hostingde-credentials ~/credentials.ini \\\n --no-hostingde-api:dns-hostingde-propagation-seconds 60 \\\n -d demo.example.org\n```\n\n## DNS Api Client\n\nSo far, only functions for zones, records and zoneConfigs have been implemented.\nSome functions have been implemented, to allow easier usage of the api for single records,\nthat will query more or less information from the api.\n\nThe DnsApiClient has a builtin retry for busy api objects, by default 2s delay and 2 retries.\n\n### API functions\n\nThe Hosting.de DNS API functions that I have implemented so far are:\n\n- recordsFind(recordFilter, limit=25, page=1, sort=None)\n- zoneConfigsFind(zoneConfigFilter, limit=25, page=1, sort=None)\n- zonesFind(zoneFilter, limit=25, page=1, sort=None)\n- zoneCreate(zoneConfig, records, useDefaultNameserverSet=False, nameserverSetId=None)\n- zoneDelete(zoneConfigId=None, zoneConfigName=None)\n- zoneRecreate(zoneConfig, records, useDefaultNameserverSet=False, nameserverSetId=None)\n- zoneUpdate(zoneConfig, recordsToAdd, recordsToDelete=[])\n\nThere are also helpers to aid with correct data structes for these functions and helper functions, that require less information.\n\n### Custom API functions\n\n- getZonesByFilter(zoneFilter, limit=25, page=1, sort=None)\n- getZonesByRecord(recordName, recordType=None, recordContent=None, limit=25, page=1, sort=None)\n- getZonesByDomainHierarchy(recordName, limit=25, page=1, sort=None)\n- getZoneByRecord(recordName, recordType=None, recordContent=None, limit=25, page=1)\n- getZoneByDomain(recordName, recordType=None, recordContent=None, limit=25, page=1)\n- getRecordsByFilter(recordFilter, limit=50, page=1, sort=None)\n- getRecords(recordName, recordType=None, recordContent=None, limit=50, page=1, sort=None)\n\n- addZoneRecordWithConfig(zoneConfig, recordName, recordType, recordContent, ttl=600)\n- deleteZoneRecordWithConfig(zoneConfig, recordName, recordType, recordContent)\n- updateZoneRecordWithConfig(zoneConfig, recordName, recordType, recordContent, oldContent, ttl=600)\n\n- deleteZoneRecordsWithFilter(zoneFilter, recordName, recordType, recordContent=None)\n- setZoneRecordWithFilter(zoneFilter, recordName, recordType, recordContent, oldContent=None, ttl=600)\n\n- addZoneRecord(zoneName, recordName, recordType, recordContent, ttl=600)\n- deleteZoneRecord(zoneName, recordName, recordType, recordContent)\n- updateZoneRecord(zoneName, recordName, recordType, recordContent, oldContent, ttl=600)\n- deleteZoneRecords(zoneName, recordName, recordType, recordContent=None)\n- setZoneRecord(zoneName, recordName, recordType, recordContent, oldContent=None, ttl=600)\n\n- addRecord(recordName, recordType, recordContent, ttl=600)\n- deleteRecord(recordName, recordType, recordContent=None)\n- setRecord(recordName, recordType, recordContent, oldContent=None, ttl=600)\n- updateRecord(recordName, recordType, recordContent, oldContent=None, ttl=600)\n\n### Examples\n\nAdding IPv4 IP:\n\n```python\nfrom hostingde.api.dns import DnsApiClient\nclient = DnsApiClient(\"MySecretLongApiKey\")\n# only 1 api call because we know the zone name:\nclient.AddZoneRecord(\"dev.example.org\", \"demo.dev.example.org\", \"A\", \"127.0.0.1\", ttl=8400)\n# alternative for unknown zone - requires 2 api calls, because we need to find the zone first - expensive!\nclient.AddRecord(\"demo.dev.example.org\", \"A\", \"127.0.0.1\", ttl=8400)\n```\n\nAdding IPv6 IP:\n\n```python\nfrom hostingde.api.dns import DnsApiClient\nclient = DnsApiClient(\"MySecretLongApiKey\")\nclient.AddZoneRecord(\"dev.example.org\", \"demo.dev.example.org\", \"AAAA\", \"AFFE::1\", ttl=8400)\n```\n\nUpdate IPv4 IP:\n\n```python\nfrom hostingde.api.dns import DnsApiClient\nclient = DnsApiClient(\"MySecretLongApiKey\")\nclient.UpdateRecord(\"demo.dev.example.org\", \"A\", \"128.0.0.1\", \"127.0.0.1\", 60)\n```\n\nIn this case the zoneConfigName and TTL are used from the first previous record, ttl can be specified. Value is only updated if there is more than one record or the current value differs from the new value.\n\n## Known Issues\n\n- No warning handling from responses\n\n## Dependencies\n\n- requests\n\n## Install\n\n### Easy\n\n```sh\npip install no-hostingde-api\n```\n\n### Developer\n\n**Local install**:\n```sh\ngit clone https://github.com/DimeOne/no-hostingde-api.git\ncd hostingde-api\npython setup.py develop\n```\n\nor\n\n```sh\ngit clone https://github.com/DimeOne/no-hostingde-api.git\ncd hostingde-api\npip install -e .\n```\n\n**Build:**\n\n```sh\npip install -r dev.requirements.txt\npython setup.py sdist bdist_wheel\n```\n\n**Publish:**\n\n```sh\npip install -r dev.requirements.txt\ntwine upload dist/*\n```\n\n## Changelog\n\n- 0.3.1: Fix for api zoneConfig changes.\n\n## References\n\n- [Github Project Page]\n- [Hosting.de Provider]\n- [Hosting.de Profile]\n- [Hosting.de API Reference]\n- [Hosting.de DNS API Reference]\n\n[Hosting.de Provider]: https://www.hosting.de\n[Hosting.de Profile]: https://secure.hosting.de/profile\n[Github Project Page]: https://github.com/DimeOne/no-hostingde-api\n[Hosting.de API Reference]: https://www.hosting.de/api/\n[Hosting.de DNS API Reference]: https://www.hosting.de/api/#dns\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/DimeOne/no-hostingde-api", "keywords": "hosting.de dns api client development certbot certbot-dns certbot-dns-plugin", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "no-hostingde-api", "package_url": "https://pypi.org/project/no-hostingde-api/", "platform": "any", "project_url": "https://pypi.org/project/no-hostingde-api/", "project_urls": { "Homepage": "https://github.com/DimeOne/no-hostingde-api" }, "release_url": "https://pypi.org/project/no-hostingde-api/0.3.1/", "requires_dist": [ "requests" ], "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "summary": "Unofficial Client for Hosting.de API", "version": "0.3.1" }, "last_serial": 4877050, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "0902486a8c4bd09685ef5d5c9948e03d", "sha256": "b892d8a3f14e4083dbb37d81f255cbef2b27e34597d15f4bd925049a7ba94621" }, "downloads": -1, "filename": "no_hostingde_api-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0902486a8c4bd09685ef5d5c9948e03d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 6473, "upload_time": "2018-05-17T16:41:16", "url": "https://files.pythonhosted.org/packages/ca/a3/17eeb384b7521c5bd5f9e73d6d076e5b60aac7a00b40967b25bce95b3f9c/no_hostingde_api-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff766ba1e89b24bd8bdd879ab6aae067", "sha256": "77ca93ebf90a4750289c3f2ca3b15fcb92b7a19817db44f46a7f097b783daf18" }, "downloads": -1, "filename": "no-hostingde-api-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ff766ba1e89b24bd8bdd879ab6aae067", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 6087, "upload_time": "2018-05-17T16:41:17", "url": "https://files.pythonhosted.org/packages/a0/d7/0c33c66dde0b70602b59c97de49a8150013e7c6ef24cbb6aede2215c00cf/no-hostingde-api-0.1.4.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "42965e87ab231f0df8d23f99d737697f", "sha256": "d6fd9641656304033e570259feaac9e5b33af2598b34a14827c5dad1d2cb4e80" }, "downloads": -1, "filename": "no_hostingde_api-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "42965e87ab231f0df8d23f99d737697f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 9008, "upload_time": "2018-09-09T22:27:04", "url": "https://files.pythonhosted.org/packages/64/f2/46523bbb31779d778e538b4aa6b7f6167216879a6c91ac5b99737bce47e8/no_hostingde_api-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4779fe1f73fec27a9174be9970cb41e1", "sha256": "1b25cd184d177b8b43fbe75fad941bd711a9f80ae4609844d857f96612cd6ed2" }, "downloads": -1, "filename": "no-hostingde-api-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4779fe1f73fec27a9174be9970cb41e1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 10011, "upload_time": "2018-09-09T22:27:30", "url": "https://files.pythonhosted.org/packages/a7/51/d56dd082fb9c0e13cccad5831c255304a358e54739a276bc16c792de3f09/no-hostingde-api-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "8c2032a8a868fafb6251372f8921d3b3", "sha256": "ef97c5bb3ca85b0e91f873cda2c25e577eee699a503807223036bc6c2915481e" }, "downloads": -1, "filename": "no_hostingde_api-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8c2032a8a868fafb6251372f8921d3b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 8995, "upload_time": "2018-09-10T16:05:27", "url": "https://files.pythonhosted.org/packages/4f/84/d3e1d7a2b23dc15359d6b3de198a56a3132fd05249d898b2a89d0a16c621/no_hostingde_api-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ba1bb49e30cab9caa564d50170eefa98", "sha256": "d6da1e30bc839a1447a1ad905bc8b2c66dd09c9991149f7f9744f67c4cc7fc9f" }, "downloads": -1, "filename": "no-hostingde-api-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ba1bb49e30cab9caa564d50170eefa98", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 10000, "upload_time": "2018-09-10T16:05:43", "url": "https://files.pythonhosted.org/packages/6b/2d/ad2d3f7cc928f3e9e64e2addf876e8b128e9ae7a695e5b00c4b3985d1e32/no-hostingde-api-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2f87ef21e31a594d71ed60f43bb30442", "sha256": "a3dcbde7374f8dc042bfae5306f9c15f667f12858a0de263e08d59d9e2d672c3" }, "downloads": -1, "filename": "no_hostingde_api-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2f87ef21e31a594d71ed60f43bb30442", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 11820, "upload_time": "2018-09-10T22:38:06", "url": "https://files.pythonhosted.org/packages/ff/07/79c3a698d692e24952680964293b91780c5c73396ded200307ea9efb1c7a/no_hostingde_api-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9f339fa4a4d34746531c238941111357", "sha256": "e61289315dda653124c5581c83892ea20dd204c05031150d804d4f73b4973eca" }, "downloads": -1, "filename": "no-hostingde-api-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9f339fa4a4d34746531c238941111357", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 13053, "upload_time": "2018-09-10T22:38:07", "url": "https://files.pythonhosted.org/packages/9b/b5/132dd33f37ee2874f53db9603d75092364af0b6931c38de9a8b5aaccd71f/no-hostingde-api-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "1f250bbc2bd1c77b6425945e4f02c8b1", "sha256": "084698fc2f9688bee56ed253d5fff5b40f2fe276ed84ffccfa24f775530557f6" }, "downloads": -1, "filename": "no_hostingde_api-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1f250bbc2bd1c77b6425945e4f02c8b1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 12720, "upload_time": "2019-02-28T01:41:56", "url": "https://files.pythonhosted.org/packages/09/8d/22f4eb6455b4b79b7bfd3ac9e3bf86ad63f61f672e3210e665dcb7831e99/no_hostingde_api-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4ee3d22affae2ee3092f2132135b6b8", "sha256": "e1a7572b987d01c100281256d95a6a37111949d0fec93d2c42a8be8eecd717c5" }, "downloads": -1, "filename": "no-hostingde-api-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d4ee3d22affae2ee3092f2132135b6b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 13209, "upload_time": "2019-02-28T01:41:57", "url": "https://files.pythonhosted.org/packages/67/fe/cb48273362868e0deb9042d7c0b186683875f8ba84cd110e081755cdd369/no-hostingde-api-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f250bbc2bd1c77b6425945e4f02c8b1", "sha256": "084698fc2f9688bee56ed253d5fff5b40f2fe276ed84ffccfa24f775530557f6" }, "downloads": -1, "filename": "no_hostingde_api-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1f250bbc2bd1c77b6425945e4f02c8b1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 12720, "upload_time": "2019-02-28T01:41:56", "url": "https://files.pythonhosted.org/packages/09/8d/22f4eb6455b4b79b7bfd3ac9e3bf86ad63f61f672e3210e665dcb7831e99/no_hostingde_api-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4ee3d22affae2ee3092f2132135b6b8", "sha256": "e1a7572b987d01c100281256d95a6a37111949d0fec93d2c42a8be8eecd717c5" }, "downloads": -1, "filename": "no-hostingde-api-0.3.1.tar.gz", "has_sig": false, "md5_digest": "d4ee3d22affae2ee3092f2132135b6b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 13209, "upload_time": "2019-02-28T01:41:57", "url": "https://files.pythonhosted.org/packages/67/fe/cb48273362868e0deb9042d7c0b186683875f8ba84cd110e081755cdd369/no-hostingde-api-0.3.1.tar.gz" } ] }