{ "info": { "author": "Sergey Andrianov", "author_email": "info@andrian.ninja", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: Name Service (DNS)" ], "description": "NIC.RU API wrapper library\n==========================\n\nThe package is a wrapper for the API of Russian DNS registrar Ru-Center\n(a.k.a. NIC.RU). The library provides classes for managing DNS services,\nzones and records.\n\nInstallation\n------------\n\nUsing ``pip``::\n\n pip install nic-api\n\nIf you want to use the module in your project, add this line to the project's\n``requirements.txt`` file::\n\n nic-api\n\nUsage\n-----\n\nInitialization\n~~~~~~~~~~~~~~\n\nTo start using the API, you should get a pair of OAuth application login and\npassword from NIC.RU. Here is the registration page:\nhttps://www.nic.ru/manager/oauth.cgi?step=oauth.app_register\n\nCreate an instance of ``nic_api.DnsApi`` and provide the OAuth application\ncredentials:\n\n.. code:: python\n\n from nic_api import DnsApi\n oauth_config = {\n 'APP_LOGIN': 'your_application_login',\n 'APP_PASSWORD': 'your_application_secret'\n }\n api = DnsApi(oauth_config)\n\nAuthorization\n~~~~~~~~~~~~~\n\nCall the ``authorize()`` method and specify the username and the password\nof your NIC.RU account, and a file to store the OAuth token for future use:\n\n.. code:: python\n\n api.authorize(username='Your_account/NIC-D',\n password='Your_password',\n token_filename='nic_token.json')\n\nNow you are ready to use the API.\n\nWhile the token in ``token_filename`` file is valid, you don't need to\nprovide neither username or password to access the API - just create\nan instance of the ``DnsApi`` class with the same OAuth config, and pass only\n``token_filename`` to the ``authorize()`` method.\n\nViewing services and DNS zones\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn the NIC.RU, DNS zones are located in \"services\":\n\n.. code:: python\n\n api.services()\n\nUsually there is one service per account. Let's view available zones in the\nservice ``MY_SERVICE``:\n\n.. code:: python\n\n api.zones('MY_SERVICE')\n\n**Always check if the zone has any uncommitted changes to it before\nmaking any modifications - your commit will apply other changes too!**\n\nGetting DNS records\n~~~~~~~~~~~~~~~~~~~\n\nFor viewing or modifying records, you need to specify both service and DNS\nzone name:\n\n.. code:: python\n\n api.records('MY_SERIVCE', 'example.com')\n\nCreating a record\n~~~~~~~~~~~~~~~~~\n\nTo add a record, create an instance of one of the ``nic_api.models.DNSRecord``\nsubclasses, i.e. ``ARecord``:\n\n.. code:: python\n\n from nic_api.models import ARecord\n record_www = ARecord(name='www', a='8.8.8.8', ttl=3600)\n\nAdd this record to the zone and commit the changes:\n\n.. code:: python\n\n api.add_record(record_www, 'MY_SERVICE', 'example.com')\n api.commit('MY_SERVICE', 'example.com')\n\nDeleting a record\n~~~~~~~~~~~~~~~~~\n\nEvery record in the zone has an unique ID, and it's accessible via\n``DNSRecord.id`` property. When you got the ID, pass it to the\n``delete_record`` method:\n\n.. code:: python\n\n api.delete_record(100000, 'MY_SERVICE', 'example.com')\n api.commit('MY_SERVICE', 'example.com')\n\nDo not forget to always commit the changes!\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/andr1an/nic-api", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "nic-api", "package_url": "https://pypi.org/project/nic-api/", "platform": "", "project_url": "https://pypi.org/project/nic-api/", "project_urls": { "Bug Reports": "https://github.com/andr1an/nic-api/issues", "Homepage": "https://github.com/andr1an/nic-api", "Source": "https://github.com/andr1an/nic-api" }, "release_url": "https://pypi.org/project/nic-api/0.2.2/", "requires_dist": [ "requests (>=2.4)" ], "requires_python": ">=2.7, <3.8", "summary": "NIC.RU API wrapper library", "version": "0.2.2" }, "last_serial": 5829360, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fc7e159b649f8fda90829365a5d549c5", "sha256": "029b2af2c5dd7d6792676918dfdd66c120068c6fca97142c1bc37281173c1885" }, "downloads": -1, "filename": "nic_api-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "fc7e159b649f8fda90829365a5d549c5", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7, <3", "size": 9418, "upload_time": "2018-06-09T15:12:55", "url": "https://files.pythonhosted.org/packages/ba/71/b2398eecf66994802acbdda6ae9bb2dfe17f92894c3478cf603ae809a9f8/nic_api-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d9a7f2a2e396156f53dabc3954e516b8", "sha256": "1a4738592440b39406b7b803c6fd3b35033f2e738cff220291754abf25ac1263" }, "downloads": -1, "filename": "nic_api-0.1.tar.gz", "has_sig": false, "md5_digest": "d9a7f2a2e396156f53dabc3954e516b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, <3", "size": 9741, "upload_time": "2018-06-09T15:12:56", "url": "https://files.pythonhosted.org/packages/97/39/79291784e929bc4e1347c2818539d01ca6816894459ed9eebde21b957e21/nic_api-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "49713ea02ccfc52aae27cd7bbf1f1592", "sha256": "fec1a99b6a45318b729bf1882becf0569ea22acf3306f9488e07c6924d25df03" }, "downloads": -1, "filename": "nic_api-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "49713ea02ccfc52aae27cd7bbf1f1592", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.7, <3", "size": 9416, "upload_time": "2018-06-09T18:15:03", "url": "https://files.pythonhosted.org/packages/b9/59/7c40c5fb9e5f64480d52c13020983bfb72a5fc7826be6559add276ea06bc/nic_api-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "167d87f20985d68fba49fdcfc05e8865", "sha256": "43eb0420b5a9ae0d502809b6068ddbe79cb79f3f3b08475669e20630b7512175" }, "downloads": -1, "filename": "nic_api-0.1.1.tar.gz", "has_sig": false, "md5_digest": "167d87f20985d68fba49fdcfc05e8865", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, <3", "size": 9757, "upload_time": "2018-06-09T18:15:04", "url": "https://files.pythonhosted.org/packages/fa/80/6ffa4f548143455c6858055c43bc7353035c252fb9038697b423d4ded8ae/nic_api-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5a2437d1da218af0353d6565c2dc3e2e", "sha256": "04927ba304ec25ace472ee380cb23f57ad0d643c47367492a2f77f0cf12ee544" }, "downloads": -1, "filename": "nic_api-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5a2437d1da218af0353d6565c2dc3e2e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, <3.8", "size": 21999, "upload_time": "2019-03-14T22:58:45", "url": "https://files.pythonhosted.org/packages/80/69/f8e08ecc47c41b14b231c5802ad04d7ad0f29d29e0536e573e0208343df2/nic_api-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ab335c7f4801285dc493372c00d56ff5", "sha256": "231f18fe542d46a0f297a5ebbc38defd91d3bd8f8f3722d6b4f54a8a0d5fb701" }, "downloads": -1, "filename": "nic_api-0.2.0.tar.gz", "has_sig": false, "md5_digest": "ab335c7f4801285dc493372c00d56ff5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, <3.8", "size": 10048, "upload_time": "2019-03-14T22:58:47", "url": "https://files.pythonhosted.org/packages/1c/c5/ae81cbcb6df993918ad033856d0e9d849f6daa9d8b8ffe8075aa209df2a6/nic_api-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e9b898bc6f40d6e8902a7ee39dc8f206", "sha256": "e3e8037e2b5648ad24d8a8ca1e93441bae175d50f4fedf7191d690c584033c9b" }, "downloads": -1, "filename": "nic_api-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e9b898bc6f40d6e8902a7ee39dc8f206", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, <3.8", "size": 22001, "upload_time": "2019-03-14T23:25:53", "url": "https://files.pythonhosted.org/packages/86/10/6424b71112364c0c83345ab1caa6a8c527cf9178e0c4a7fd20a46d53d215/nic_api-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae0f6f6ae8992fb2f4332ab17f9dc37f", "sha256": "237ad67542d2c22a45175fba02b3b2cb5bdda5a49b5feb14121e2d69a0c95242" }, "downloads": -1, "filename": "nic_api-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ae0f6f6ae8992fb2f4332ab17f9dc37f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, <3.8", "size": 10057, "upload_time": "2019-03-14T23:25:55", "url": "https://files.pythonhosted.org/packages/13/8e/9ecc1f7bcee377618d7e88bcc1349e421cd62cd3e69c32c6aea2f52adbfe/nic_api-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "5e91cc2d47989d26d1525d40401c2eca", "sha256": "b9f9263a6d15e1678b0462a6085c725ca91a1ac148b45b367626f20a994e3a47" }, "downloads": -1, "filename": "nic_api-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e91cc2d47989d26d1525d40401c2eca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, <3.8", "size": 22027, "upload_time": "2019-09-14T14:17:18", "url": "https://files.pythonhosted.org/packages/36/e3/4464442e83820cd3f1b7ca19b8e8de50590282d928488a50ebda388c5118/nic_api-0.2.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5e91cc2d47989d26d1525d40401c2eca", "sha256": "b9f9263a6d15e1678b0462a6085c725ca91a1ac148b45b367626f20a994e3a47" }, "downloads": -1, "filename": "nic_api-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e91cc2d47989d26d1525d40401c2eca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, <3.8", "size": 22027, "upload_time": "2019-09-14T14:17:18", "url": "https://files.pythonhosted.org/packages/36/e3/4464442e83820cd3f1b7ca19b8e8de50590282d928488a50ebda388c5118/nic_api-0.2.2-py2.py3-none-any.whl" } ] }