diff --git a/README.md b/README.md new file mode 100644 index 0000000..71d902b --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +### This repository is no longer maintained in favour of Official Apache Atlas' python client: + + +Apache Atlas Client in Python +----------------------------- + +[![image](https://img.shields.io/pypi/v/pyatlasclient.svg)](https://pypi.python.org/pypi/pyatlasclient) [![image](https://img.shields.io/travis/verdan/pyatlasclient.svg)](https://travis-ci.org/verdan/pyatlasclient) [![image](https://coveralls.io/repos/github/verdan/pyatlasclient/badge.svg?branch=master)](https://coveralls.io/github/verdan/pyatlasclient?branch=master) [![Documentation Status](https://readthedocs.org/projects/pyatlasclient/badge/?version=latest)](https://pyatlasclient.readthedocs.io/en/latest/?badge=latest) [![Updates](https://pyup.io/repos/github/verdan/pyatlasclient/shield.svg)](https://pyup.io/repos/github/verdan/pyatlasclient/) + +Apache Atlas client in Python. Only compatible with Apache Atlas REST +API **v2**. + +*Based on the awesome work done by Poullet in atlasclient* + +- Free software: Apache Software License 2.0 +- Documentation: + +### Get started + +```python + from atlasclient.client import Atlas + client = Atlas('', port=21000, username='admin', password='admin') + client.entity_guid("").status + params = {'typeName': 'DataSet', 'attrName': 'name', 'attrValue': 'data', 'offset': '1', 'limit':'10'} + search_results = client.search_attribute(**params) + for s in search_results: + for e in s.entities: + print(e.name) + print(e.guid) +``` + +### Features + +- Lazy loading: requests are only performed when data are required and + not yet available +- Leverages Python\'s Data Classes for Glossary. +- Resource object relationships: REST API from sub-resources are done + transparently for the user, for instance the user does not have to + know that it needs to trigger a different REST request for getting + the classifications of a specific entity. + +### TODO features + +- allow multiprocessing +- Implement Caching +- Apply Data Classes to all entity types. For now only Glossary + endpoints are using it. + +### Credits + +This package was created with +[Cookiecutter](https://github.com/audreyr/cookiecutter) and the +[audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) +project template. diff --git a/setup.py b/setup.py index a78ad29..e19d351 100644 --- a/setup.py +++ b/setup.py @@ -12,15 +12,20 @@ from atlasclient import __version__ as version -with open(os.path.join(here, 'README.rst')) as readme_file: - readme = readme_file.read() +# read the contents of your README file +this_directory = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f: + long_description = f.read() -with open(os.path.join(here, 'HISTORY.rst')) as history_file: - history = history_file.read() - -requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt') -test_requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test_requirements.txt') -setup_requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'setup_requirements.txt') +requirements_path = os.path.join( + os.path.dirname(os.path.realpath(__file__)), "requirements.txt" +) +test_requirements_path = os.path.join( + os.path.dirname(os.path.realpath(__file__)), "test_requirements.txt" +) +setup_requirements_path = os.path.join( + os.path.dirname(os.path.realpath(__file__)), "setup_requirements.txt" +) with open(requirements_path) as requirements_file: requirements = requirements_file.readlines() @@ -32,29 +37,30 @@ setup_requirements = setup_requirements_file.readlines() setup_args = dict( - name='pyatlasclient', + name="pyatlasclient", version=version, description="Apache Atlas Python Client", - long_description=readme + '\n\n' + history, + long_description=long_description, + long_description_content_type="text/markdown", author="Verdan Mahmood", - author_email='verdan.mahmood@gmail.com', - url='https://github.com/verdan/pyatlasclient', - packages=find_packages(include=['atlasclient']), + author_email="verdan.mahmood@gmail.com", + url="https://github.com/verdan/pyatlasclient", + packages=find_packages(include=["atlasclient"]), include_package_data=True, install_requires=requirements, - license='Apache Software License 2.0', + license="Apache Software License 2.0", zip_safe=False, - keywords='atlasclient, pyatlasclient, apache atlas, atlas', + keywords="atlasclient, pyatlasclient, apache atlas, atlas", classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Natural Language :: English', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", ], - test_suite='tests', + test_suite="tests", tests_require=test_requirements, )