{ "info": { "author": "eHealth Africa", "author_email": "aether@ehealthafrica.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Aether Python Library\n\nThis is the official Python Library with Aether functions.\n\n## Table of contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Distribution](#distribution)\n- [Tests](#tests)\n- [Usage](#usage)\n - [Redis tools](#redis-tools)\n\n\n## Requirements\n\nThis library requires **Python 3.6** and above.\n\nPython libraries:\n\n- [eha-jsonpath](https://github.com/eHealthAfrica/jsonpath-extensions/)\n Provides new Extensions to the jsonpath_ng python library to provide commonly requested functions\n- [jsonschema](https://github.com/Julian/jsonschema)\n An implementation of JSON Schema validation for Python\n- [redis](https://github.com/andymccurdy/redis-py)\n Python client for Redis key-value store\n- [requests](https://2.python-requests.org//en/master/)\n HTTP for Humans.\n- [spavro](http://github.com/pluralsight/spavro)\n An Avro library, Spavro is a (sp)eedier avro implementation using Cython\n\nExtra dependencies (based on settings):\n\n- **test**\n - [coverage](https://coverage.readthedocs.io/)\n A tool for measuring code coverage of Python programs.\n - [fakeredis](https://github.com/jamesls/fakeredis)\n Fake implementation of redis API for testing purposes.\n - [flake8](http://flake8.pycqa.org/en/latest/)\n Tool For Style Guide Enforcement.\n - [flake8-quotes](https://github.com/zheller/flake8-quotes)\n Flake8 extension for checking quotes in python.\n - [tblib](https://github.com/ionelmc/python-tblib)\n Traceback serialization library.\n\n*[Return to TOC](#table-of-contents)*\n\n\n## Installation\n\n```bash\n# standalone\npip3 install aether.python\n```\n\n*[Return to TOC](#table-of-contents)*\n\n\n## Distribution\n\nHow to create the package distribution\n\nExecute the following command:\n\n```bash\npython3 setup.py bdist_wheel\n```\n\nor\n\n```bash\n./scripts/build.sh\n```\n\n*[Return to TOC](#table-of-contents)*\n\n\n## Tests\n\nDepending on your preference you can either use virtualenv or pipenv to test the library locally.\n\n#### Virtual Env\n\nFirst install dependencies (execute it only once):\n\n```bash\n./scripts/install.sh\n```\n\nAfter that execute the following command:\n\n```bash\nsource ./venv/bin/activate\n./scripts/test.sh\n```\n\n#### Pipenv\n\nIn the root folder run:\n```bash\npipenv install .\n```\n\nThen to test run:\n```bash\npipenv run scripts/test.sh\n```\n\n\nThe file `scripts/test.ini` contains the environment variables used in the tests.\n\n*[Return to TOC](#table-of-contents)*\n\n\n## Usage\n\n### Redis Tools\nThis provides an interface to a Redis server via supplied redis parameters.\n\nIt makes available a number of `CRUD` redis operation which include but not limited to:\n - Formats document keys into `_{type}:{tenant}:{id}` before being cached on redis.\n - Retrieves documents based on preformated keys.\n - Removes documents based on preformated keys.\n - Subscribes to key based channels with a callback function.\n\n#### Usage\n\n```\nfrom aether.python.redis.task import TaskHelper\n\nREDIS_TASK = TaskHelper(settings, redis_instance)\n\n# Settings must have the following properties:\n# REDIS_HOST str - Redis server host,\n# REDIS_PORT int - Redis server port,\n# REDIS_PASSWORD str - Redis server password,\n# REDIS_DB str - Redis database name\n\n# redis_instance (Optional) - Pass an existing redis connection\n# (If provided, ignores all settings and uses redis_instance)\n\ndocument = {\n 'id': 'document_id',\n 'name': 'document name'\n}\n\ndocument_type = 'test_document'\naether_tenant = 'prod'\n\n# add document to redis\nREDIS_TASK.add(task=document, type=document_type, tenant=aether_tenant)\n\n# retrieve document from redis\nREDIS_TASK.get(_id=document['id'], type=document_type, tenant=aether_tenant)\n\n# subcribe to a key based channel\n\nCHANNEL = '_test_document*' # listens for messages published to all channels starting with '_test_document'\n\ndef handle_callback(msg):\n print(msg) # handle returned message\n\nREDIS_TASK.subscribe(callback=handle_callback, pattern=CHANNEL, keep_alive=True)\n\n\n# publish document\nREDIS_TASK.publish(task=document, type=document_type, tenant=aether_tenant) # this will trigger the 'handle_callback' function with the published document to all subscribed clients\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/eHealthAfrica/aether-python-library/", "keywords": "redis,entity,extraction,utils,validators,aether", "license": "Apache2 License", "maintainer": "", "maintainer_email": "", "name": "aether.python", "package_url": "https://pypi.org/project/aether.python/", "platform": "", "project_url": "https://pypi.org/project/aether.python/", "project_urls": { "Homepage": "https://github.com/eHealthAfrica/aether-python-library/" }, "release_url": "https://pypi.org/project/aether.python/1.0.11/", "requires_dist": [ "redis", "requests", "eha-jsonpath", "jsonschema", "spavro", "coverage ; extra == 'test'", "flake8 ; extra == 'test'", "flake8-quotes ; extra == 'test'", "tblib ; extra == 'test'" ], "requires_python": ">=3.6", "summary": "A python library with Aether Python functionality", "version": "1.0.11" }, "last_serial": 5883931, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4568bac19ee9003abf8e400c1363ce79", "sha256": "1a794f24d1dc7d9da423196bb18f120e954fc4e4a8b6dbda54bf9454904f7e9b" }, "downloads": -1, "filename": "aether.python-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4568bac19ee9003abf8e400c1363ce79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21229, "upload_time": "2019-08-29T14:06:41", "url": "https://files.pythonhosted.org/packages/08/a7/091e86763b9cf610f76e2b88649943c3cc4378a91e0d533b174aef9ba858/aether.python-1.0.0-py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "536b1ba70bd97c39afb0f2d2e8c8233e", "sha256": "364223b3a97fb794f487bf81cf68acf7df1c67efd11c4505de8d3954d830858f" }, "downloads": -1, "filename": "aether.python-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "536b1ba70bd97c39afb0f2d2e8c8233e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 29314, "upload_time": "2019-08-29T15:02:53", "url": "https://files.pythonhosted.org/packages/df/65/e95e781012f41bed12d2d9cbdf995ed35ea6c7e60a51155372a591ed4447/aether.python-1.0.1-py3-none-any.whl" } ], "1.0.10": [ { "comment_text": "", "digests": { "md5": "77f0be63061622676669c3dab845254a", "sha256": "1496b96f0880213f081c7153992ce7068d6900de963c4e6852da85e5781bb8df" }, "downloads": -1, "filename": "aether.python-1.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "77f0be63061622676669c3dab845254a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 31050, "upload_time": "2019-09-24T14:35:24", "url": "https://files.pythonhosted.org/packages/e5/bf/e9ec3a3829d8bceb5fe6dc4167504dbfe79489438e6893b8054f5925d1cb/aether.python-1.0.10-py3-none-any.whl" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "91eb165daa7d08f9e050210e63d60e33", "sha256": "cd959f5ee3c8bf53e7a968e58e0f5aae6a3ac20768bdc7d0263c4dc7e0c43e71" }, "downloads": -1, "filename": "aether.python-1.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "91eb165daa7d08f9e050210e63d60e33", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 31123, "upload_time": "2019-09-25T08:47:57", "url": "https://files.pythonhosted.org/packages/9a/98/12f284751e8d09d62e4086de91211f842d82d0ee641b745707249c161230/aether.python-1.0.11-py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "20aeb3ccb5663f11b35fa56b61ea9d4c", "sha256": "a62b7a1939bc9b2ff081a7d3caa88488029988217c5c36520fbb028ab38850d5" }, "downloads": -1, "filename": "aether.python-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "20aeb3ccb5663f11b35fa56b61ea9d4c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 29345, "upload_time": "2019-08-30T11:20:19", "url": "https://files.pythonhosted.org/packages/3f/85/4d9b98a9e7c962a175942cbdae989434263440a86fea9fbfcf5c4ccca98c/aether.python-1.0.3-py3-none-any.whl" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "1941380976d033ee4e7e4da3a21dc83b", "sha256": "7d70fcf57052a2a5be7a29920bd1e653c023a4384a1ce33c34f883d773df1c33" }, "downloads": -1, "filename": "aether.python-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1941380976d033ee4e7e4da3a21dc83b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30441, "upload_time": "2019-09-03T13:37:34", "url": "https://files.pythonhosted.org/packages/a4/5d/24233d9a63ea1682315be391209eb60796c1b2817ac3f8f942e898b1ca8f/aether.python-1.0.4-py3-none-any.whl" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "0b7b7709cd1469fc86c22b3c45a67892", "sha256": "69d910073d221c3abe5af283d2c917f3410b5bf7f1efe719c3c1a742d4cc8aab" }, "downloads": -1, "filename": "aether.python-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0b7b7709cd1469fc86c22b3c45a67892", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30701, "upload_time": "2019-09-04T17:01:27", "url": "https://files.pythonhosted.org/packages/2f/95/afa4c0534b3a775c381725dff017f4fa23c2dd75bd11ee12ecb86b608417/aether.python-1.0.5-py3-none-any.whl" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "0ef83804ec5724c7d7fb4e8a79ef7df5", "sha256": "fc43cb7d3460b162344cb0a977384c3dabb623315a519e2ef57252dda2892135" }, "downloads": -1, "filename": "aether.python-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "0ef83804ec5724c7d7fb4e8a79ef7df5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30706, "upload_time": "2019-09-05T15:49:17", "url": "https://files.pythonhosted.org/packages/c8/be/4498697051a51f89352f68a35d78828bcea0375305417db746e109bd2828/aether.python-1.0.6-py3-none-any.whl" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "c94d9dff541a85076cd075ce0abab87a", "sha256": "6d0646fc4a8c0797eb2c12cf1438c93c57d883737aa114574a6f4f946ac25469" }, "downloads": -1, "filename": "aether.python-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "c94d9dff541a85076cd075ce0abab87a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30704, "upload_time": "2019-09-18T15:33:23", "url": "https://files.pythonhosted.org/packages/58/fc/b55f6572678230f6bad73dabae0e16b5d0e464ba39bdd93351776417f819/aether.python-1.0.7-py3-none-any.whl" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "8fc32d8f73bcb5113b5f764fa84324a4", "sha256": "78513a7dd87d6401b70d37d2bcaa7ee8ce342231e061aeebd60b385f49cbfc8b" }, "downloads": -1, "filename": "aether.python-1.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "8fc32d8f73bcb5113b5f764fa84324a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30913, "upload_time": "2019-09-23T13:56:09", "url": "https://files.pythonhosted.org/packages/f6/61/45089c43051e7c82b9ce9a886c61f792e130ace4b66da1dda90e021251c6/aether.python-1.0.8-py3-none-any.whl" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "8463310192bd52a6fc98c048f0cc0985", "sha256": "c9d93ad4fa60ec623eca24c76170c328e68e602179c08e33733522d3cdd99a58" }, "downloads": -1, "filename": "aether.python-1.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "8463310192bd52a6fc98c048f0cc0985", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 30988, "upload_time": "2019-09-24T13:08:46", "url": "https://files.pythonhosted.org/packages/d3/ef/3b576ca7097ed7e54969bed8182def65fa17bf6cf487893f474b61b43347/aether.python-1.0.9-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91eb165daa7d08f9e050210e63d60e33", "sha256": "cd959f5ee3c8bf53e7a968e58e0f5aae6a3ac20768bdc7d0263c4dc7e0c43e71" }, "downloads": -1, "filename": "aether.python-1.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "91eb165daa7d08f9e050210e63d60e33", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 31123, "upload_time": "2019-09-25T08:47:57", "url": "https://files.pythonhosted.org/packages/9a/98/12f284751e8d09d62e4086de91211f842d82d0ee641b745707249c161230/aether.python-1.0.11-py3-none-any.whl" } ] }