{"id":13994207,"url":"https://github.com/dnsimple/dnsimple-python","last_synced_at":"2025-05-16T12:04:32.836Z","repository":{"id":1106572,"uuid":"972696","full_name":"dnsimple/dnsimple-python","owner":"dnsimple","description":"The DNSimple API client for Python.","archived":false,"fork":false,"pushed_at":"2025-01-20T12:35:01.000Z","size":671,"stargazers_count":66,"open_issues_count":1,"forks_count":42,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-04T12:39:36.776Z","etag":null,"topics":["api","api-client","dnsimple","dnsimple-api","dnsimple-policy-eng","dnsimple-policy-group-apiclient","dnsimple-policy-triage-application","python"],"latest_commit_sha":null,"homepage":"https://developer.dnsimple.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnsimple.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2010-10-08T16:53:43.000Z","updated_at":"2025-01-20T12:35:01.000Z","dependencies_parsed_at":"2023-02-17T19:30:58.858Z","dependency_job_id":"f1c7669d-e8b3-4efd-a179-d1f770b00d8e","html_url":"https://github.com/dnsimple/dnsimple-python","commit_stats":{"total_commits":365,"total_committers":33,"mean_commits":11.06060606060606,"dds":0.715068493150685,"last_synced_commit":"0e7214866529c8e64c3e8425ba8a9ff64123adba"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnsimple%2Fdnsimple-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnsimple","download_url":"https://codeload.github.com/dnsimple/dnsimple-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252663502,"owners_count":21784783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","dnsimple","dnsimple-api","dnsimple-policy-eng","dnsimple-policy-group-apiclient","dnsimple-policy-triage-application","python"],"created_at":"2024-08-09T14:02:45.932Z","updated_at":"2025-05-16T12:04:32.830Z","avatar_url":"https://github.com/dnsimple.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# DNSimple Python Client\n\nA Python client for the [DNSimple API v2](https://developer.dnsimple.com/v2/).\n\n[![CI](https://github.com/dnsimple/dnsimple-python/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dnsimple/dnsimple-python/actions/workflows/ci.yml)\n\n## Documentation\n\n- [dnsimple PyPI](https://pypi.org/project/dnsimple/)\n- [DNSimple API documentation](https://developer.dnsimple.com/)\n- [DNSimple API examples repository](https://github.com/dnsimple/dnsimple-api-examples)\n- [DNSimple support documentation](https://support.dnsimple.com/)\n\n## Requirements\n\n- Python 3.12+ - Note later versions of Python may be supported, but we make no guarantees as they are not tracked in our CI.\n\n## Installation\n\nWhere `\u003cversion\u003e` denotes the version of the client you want to install.\n\nTo install the latest version:\n\n```shell\npip install dnsimple\n```\n\nTo install a specific version:\n\n```shell\npip install dnsimple==2.0.1\n\n```\n\n## Usage\n\nThis library is a Python client you can use to interact with the [DNSimple API v2](https://developer.dnsimple.com/v2/). Here are some examples.\n\n```python\nfrom dnsimple import Client\n\nclient = Client(access_token='a1b2c3')\n\n# Fetch your details\nresponse = client.identity.whoami()             # execute the call\ndata = response.data                            # extract the relevant data from the response or\naccount = client.identity.whoami().data.account # execute the call and get the data in one line\n```\n\n### Sandbox Environment\n\nWe highly recommend testing against our [sandbox environment](https://developer.dnsimple.com/sandbox/) before using our\nproduction environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the\nchance of your running up against rate limits.\n\nThe client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host using\nthe `base_url` option when you construct the client:\n\n```python\nfrom dnsimple import Client\n\nclient = Client(base_url='https://api.sandbox.dnsimple.com', access_token=\"a1b2c3\")\n```\n\nYou can also set the sandbox environment like so:\n\n```python\nfrom dnsimple import Client\n\nclient = Client(sandbox=True, access_token='a1b2c3')\n```\n\nYou will need to ensure that you are using an access token created in the sandbox environment.\nProduction tokens will *not* work in the sandbox environment.\n\n### Define an account ID\n\n```python\nfrom dnsimple import Client\n\nclient = Client(access_token='a1b2c3')\naccount_id = 1010\n\n# You can also fetch it from the whoami response\n# as long as you authenticate with an Account access token\nwhoami = client.identity.whoami().data\naccount_id = whoami.account.id\n```\n\n### List your domains\n\n```python\nfrom dnsimple import Client\n\nclient = Client(access_token='a1b2c3')\n\naccount_id = client.identity.whoami().data.account.id\ndomains = client.domains.list_domains(account_id).data                           # Domains from the 1010 account (first page)\nclient.domains.list_domains(account_id, sort='expires_on:asc').data              # Domains from the 1010 account in ascending order by domain expiration date\nclient.domains.list_domains(account_id, filter={'name_like': 'example'}).data    # Domains from the 1010 account filtered by the domain name name\n```\n\n### Create a domain\n\n```python\nfrom dnsimple import Client\n\nclient = Client(access_token='a1b2c3')\n\naccount_id = client.identity.whoami().data.account.id\nresponse = client.domains.create_domain(account_id, 'example.com')\ndomain = response.data # The newly created domain\n```\n\n### Get a domain\n\n```python\nfrom dnsimple import Client\n\nclient = Client(access_token='a1b2c3')\n\naccount_id = client.identity.whoami().data.account.id\ndomain_id = client.domains.list_domains(account_id).data[0].id\ndomain = client.domains.get_domain(account_id, domain_id).data # The domain you are looking for\n```\n\n## Setting a custom `User-Agent` header\n\nYou customize the `User-Agent` header for the calls made to the DNSimple API:\n\n```python\nfrom dnsimple import Client\n\nclient = Client(user_agent=\"my-app\")\n```\n\nThe value you provide will be appended to the default `User-Agent` the client uses.\nFor example, if you use `my-app`, the final header value will be `my-app dnsimple-python/0.1.0` (note that it will vary depending on the client version).\n\n## Contributing\n\nContibutions are welcomed. Please open an issue to discuss the changes before opening a PR. For more details on how to do development please refer to [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\nCopyright (c) 2025 DNSimple Corporation. This is Free Software distributed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimple%2Fdnsimple-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnsimple%2Fdnsimple-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnsimple%2Fdnsimple-python/lists"}