├── .gitignore ├── .travis.yml ├── LICENSE ├── README.rst ├── nsone └── __init__.py ├── setup.py └── tests ├── __init__.py └── nsone_test.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | __pycache__ 3 | 4 | # setup.py products 5 | /dist 6 | /build 7 | /nsone.egg-info 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: python 3 | python: 4 | - '2.7' 5 | - '3.6' 6 | install: 7 | - python setup.py install 8 | script: 9 | - python setup.py test 10 | notifications: 11 | slack: 12 | secure: kXWHt2FwGzohgwmwDH262R3B359iRmsjPE/wF90ur6/TOfTvxuZicpPOVWsglgDgVP92zMklwgOs941IJmg4VVvqjuvDYeaMB+KLHvxb4Vl0pOg7mLpOXmIVt3NwL3+miSwoQ24XHJb6vGzubeHAjSXpD0N1tVxb792DvHztDTo= 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 NSONE, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Legacy NS1 Python SDK 2 | ===================== 3 | 4 | > This SDK is [deprecated](https://github.com/ns1/community/blob/master/project_status/DEPRECATED.md) 5 | in favor of `ns1-python ` _and should not be used for new projects._ 6 | 7 | The code in this repository provides just a thin wrapper for the new SDK to allow easier migration. 8 | 9 | Migration to the new SDK 10 | ------------------------ 11 | 12 | The new SDK provides equivalent functionality. To migrate a project to the new 13 | SDK: 14 | 15 | * Update your project dependencies to use ``ns1-python`` instead of ``nsone``. 16 | * Replace use of ``nsone`` namespace with ``ns1``. 17 | * Replace use of ``nsone.NSONE`` with ``ns1.NS1``. 18 | -------------------------------------------------------------------------------- /nsone/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import ns1 3 | 4 | ns1.NSONE = ns1.NS1 5 | sys.modules['nsone'] = ns1 6 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | from codecs import open 4 | from os import path 5 | 6 | cwd = path.abspath(path.dirname(__file__)) 7 | 8 | with open(path.join(cwd, 'README.rst'), encoding='utf-8') as f: 9 | long_description = f.read() 10 | 11 | setup( 12 | name='nsone', 13 | version='0.9.100', 14 | description='Legacy Python SDK for the NS1 DNS platform', 15 | long_description=long_description, 16 | license='MIT', 17 | install_requires=['ns1-python'], 18 | 19 | author='NS1 Developers', 20 | author_email='devteam@ns1.com', 21 | url='https://github.com/ns1/nsone-python', 22 | 23 | packages=find_packages(exclude=['tests']), 24 | test_suite='tests', 25 | ) 26 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ns1/nsone-python/6ca9d9efb18c35c15ecf6e81b784a279d53c6312/tests/__init__.py -------------------------------------------------------------------------------- /tests/nsone_test.py: -------------------------------------------------------------------------------- 1 | import ns1 2 | import nsone 3 | import unittest 4 | 5 | 6 | class LegacyTest(unittest.TestCase): 7 | def test_import(self): 8 | self.assertEqual(nsone, ns1) 9 | 10 | def test_main_class(self): 11 | self.assertEqual(nsone.NSONE, ns1.NS1) 12 | --------------------------------------------------------------------------------