vinyldns-python


Namevinyldns-python JSON
Version 0.9.7 PyPI version JSON
download
home_pagehttps://github.com/vinyldns/vinyldns-python
SummaryPython client library for VinylDNS
upload_time2023-07-11 18:13:42
maintainer
docs_urlNone
authorvinyldns
requires_python
licenseApache Software License 2.0
keywords dns python vinyldns
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/vinyldns-python.svg)](https://badge.fury.io/py/vinyldns-python) [![Travis build](https://api.travis-ci.org/vinyldns/vinyldns-python.svg?branch=master)](https://travis-ci.org/vinyldns/vinyldns-python)
![GitHub](https://img.shields.io/github/license/vinyldns/vinyldns-python)

# vinyldns-python

Python client library for [VinylDNS](https://www.vinyldns.io/)

This project is a work in progress! If you would like to help us get this where it needs to be,
please reach out to us in [gitter](https://gitter.im/vinyldns/Lobby).

To run, `pip install vinyldns-python` and then:

```python
>>> from vinyldns.client import VinylDNSClient
>>> local_client = VinylDNSClient("ApiEndpoint", "UserAccessKey", "UserSecretKey")
>>> local_client.list_zones()
>>>
>>> # If all of the following environments are set
>>> # - VINYLDNS_API_URL
>>> # - VINYLDNS_ACCESS_KEY_ID
>>> # - VINYLDNS_SECRET_ACCESS_KEY
>>> from vinyldns.client import VinylDNSClient
>>> local_client = VinylDNSClient.from_env()
>>> local_client.list_zones()
```

## Contributing

**Requirements**

* `python3`
* `pip`
* `virtualenv`

To get started, you will want to setup your virtual environment.

1. Ensure that you have `virtualenv` installed `> pip install virtualenv`
1. Run `./bootstrap.sh` to setup your environment (unless you really want all these dependencies to be installed locally, which we do not recommend).
1. Activate your virtual environment `> source .virtualenv/bin/activate` and you will be ready to go!

**Unit Tests**

Unit tests are developed using [pytest](https://docs.pytest.org/en/latest/).  We use
[Responses](https://github.com/getsentry/responses), which allows for simple mocking of HTTP endpoints.

To run unit tests, you can simply run `python3 setup.py test`.  To target a specific test, you can
run `python3 setup.py test -a "-k my_test"`

**Functional Tests**

Functional tests are also developed with pytest. These tests run against a local instance of VinylDNS. Note that for now
they are not tied into our travis build, so they must be run locally for validation.

From your virtualenv, run `tox -e func_test`

**Running a full build**

When you are finished writing your code you will want to run everything including linters.  The
simplest way to do this is to run `tox -e check,py36`, which will run static checks and run unit tests.

If you see any failures / warnings, correct them until `tox` runs successfully.

If you do not have `tox` in your environment, `pip install tox` to add it.  For more information you can
read the [tox docs](https://tox.readthedocs.io/en/latest/index.html).

## Local Development
See the [quickstart](https://github.com/vinyldns/vinyldns/blob/master/README.md#quickstart) in the
VinylDNS api for details on how to start up a local instance of the api in docker. With that
running, you can make requests with the following client details:
```python
local_client = VinylDNSClient("http://localhost:9000", "okAccessKey", "okSecretKey")
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vinyldns/vinyldns-python",
    "name": "vinyldns-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "dns,python,vinyldns",
    "author": "vinyldns",
    "author_email": "vinyldns-core@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/fb/fa/058a890111da8c8f573d92228e4f3cec64e6ae60e4ead7c2c8c903184478/vinyldns-python-0.9.7.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/vinyldns-python.svg)](https://badge.fury.io/py/vinyldns-python) [![Travis build](https://api.travis-ci.org/vinyldns/vinyldns-python.svg?branch=master)](https://travis-ci.org/vinyldns/vinyldns-python)\n![GitHub](https://img.shields.io/github/license/vinyldns/vinyldns-python)\n\n# vinyldns-python\n\nPython client library for [VinylDNS](https://www.vinyldns.io/)\n\nThis project is a work in progress! If you would like to help us get this where it needs to be,\nplease reach out to us in [gitter](https://gitter.im/vinyldns/Lobby).\n\nTo run, `pip install vinyldns-python` and then:\n\n```python\n>>> from vinyldns.client import VinylDNSClient\n>>> local_client = VinylDNSClient(\"ApiEndpoint\", \"UserAccessKey\", \"UserSecretKey\")\n>>> local_client.list_zones()\n>>>\n>>> # If all of the following environments are set\n>>> # - VINYLDNS_API_URL\n>>> # - VINYLDNS_ACCESS_KEY_ID\n>>> # - VINYLDNS_SECRET_ACCESS_KEY\n>>> from vinyldns.client import VinylDNSClient\n>>> local_client = VinylDNSClient.from_env()\n>>> local_client.list_zones()\n```\n\n## Contributing\n\n**Requirements**\n\n* `python3`\n* `pip`\n* `virtualenv`\n\nTo get started, you will want to setup your virtual environment.\n\n1. Ensure that you have `virtualenv` installed `> pip install virtualenv`\n1. Run `./bootstrap.sh` to setup your environment (unless you really want all these dependencies to be installed locally, which we do not recommend).\n1. Activate your virtual environment `> source .virtualenv/bin/activate` and you will be ready to go!\n\n**Unit Tests**\n\nUnit tests are developed using [pytest](https://docs.pytest.org/en/latest/).  We use\n[Responses](https://github.com/getsentry/responses), which allows for simple mocking of HTTP endpoints.\n\nTo run unit tests, you can simply run `python3 setup.py test`.  To target a specific test, you can\nrun `python3 setup.py test -a \"-k my_test\"`\n\n**Functional Tests**\n\nFunctional tests are also developed with pytest. These tests run against a local instance of VinylDNS. Note that for now\nthey are not tied into our travis build, so they must be run locally for validation.\n\nFrom your virtualenv, run `tox -e func_test`\n\n**Running a full build**\n\nWhen you are finished writing your code you will want to run everything including linters.  The\nsimplest way to do this is to run `tox -e check,py36`, which will run static checks and run unit tests.\n\nIf you see any failures / warnings, correct them until `tox` runs successfully.\n\nIf you do not have `tox` in your environment, `pip install tox` to add it.  For more information you can\nread the [tox docs](https://tox.readthedocs.io/en/latest/index.html).\n\n## Local Development\nSee the [quickstart](https://github.com/vinyldns/vinyldns/blob/master/README.md#quickstart) in the\nVinylDNS api for details on how to start up a local instance of the api in docker. With that\nrunning, you can make requests with the following client details:\n```python\nlocal_client = VinylDNSClient(\"http://localhost:9000\", \"okAccessKey\", \"okSecretKey\")\n```\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Python client library for VinylDNS",
    "version": "0.9.7",
    "project_urls": {
        "Homepage": "https://github.com/vinyldns/vinyldns-python"
    },
    "split_keywords": [
        "dns",
        "python",
        "vinyldns"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abb3fdfe6eab15b3336b935a77e5521d99b24979858021786d94b8c397e112be",
                "md5": "73fe3634288a8c5d8fa580e0729c1daa",
                "sha256": "eacaf1bf173b2f3d5f08619bd53e851b56c4d62c27362eecee3e6525cc067714"
            },
            "downloads": -1,
            "filename": "vinyldns_python-0.9.7-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73fe3634288a8c5d8fa580e0729c1daa",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 24718,
            "upload_time": "2023-07-11T18:13:40",
            "upload_time_iso_8601": "2023-07-11T18:13:40.790884Z",
            "url": "https://files.pythonhosted.org/packages/ab/b3/fdfe6eab15b3336b935a77e5521d99b24979858021786d94b8c397e112be/vinyldns_python-0.9.7-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fbfa058a890111da8c8f573d92228e4f3cec64e6ae60e4ead7c2c8c903184478",
                "md5": "1b9f28c673b7aa2155486f61cc7b972b",
                "sha256": "d7efe92dcb8e5aa6b6a1385a91dc0c816b11cb605e73dcf195f9174d626a7d1a"
            },
            "downloads": -1,
            "filename": "vinyldns-python-0.9.7.tar.gz",
            "has_sig": false,
            "md5_digest": "1b9f28c673b7aa2155486f61cc7b972b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 25739,
            "upload_time": "2023-07-11T18:13:42",
            "upload_time_iso_8601": "2023-07-11T18:13:42.478606Z",
            "url": "https://files.pythonhosted.org/packages/fb/fa/058a890111da8c8f573d92228e4f3cec64e6ae60e4ead7c2c8c903184478/vinyldns-python-0.9.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-11 18:13:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vinyldns",
    "github_project": "vinyldns-python",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "vinyldns-python"
}
        
Elapsed time: 0.08790s