{ "info": { "author": "eHealth Africa", "author_email": "info@ehealthafrica.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "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": "# Django eHealth SDK\n\nThis library contains the most common features used by the different eHealth django apps.\n\n## Table of contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Distribution](#distribution)\n- [Tests](#tests)\n- [Usage](#usage)\n\n\n## Requirements\n\nThis library requires **Python 3.6** and above.\n\nPython libraries:\n\n- [django](https://www.djangoproject.com/) As web framework. (**Above 2**)\n- [django-cors-headers](https://github.com/ottoyiu/django-cors-headers)\n for handling the server headers required for Cross-Origin Resource Sharing (CORS).\n- [django-debug-toolbar](https://github.com/jazzband/django-debug-toolbar)\n A configurable set of panels that display various debug information about the current request/response.\n- [django-prometheus](https://github.com/korfuri/django-prometheus)\n to monitor the application with Prometheus.io.\n- [django-uwsgi](https://github.com/unbit/django-uwsgi)\n Django related examples/tricks/modules for uWSGI.\n- [djangorestframework](https://www.django-rest-framework.org/)\n A powerful and flexible toolkit for building Web APIs. (**Above 3.8**)\n- [drf-dynamic-fields](https://github.com/dbrgn/drf-dynamic-fields)\n Dynamically select only a subset of fields per DRF resource,\n either using a whitelist or a blacklist.\n- [psycopg2-binary](http://initd.org/psycopg/)\n Python-PostgreSQL Database Adapter.\n- [pygments](http://pygments.org/)\n A syntax highlighting package written in Python.\n- [python-json-logger](https://github.com/madzak/python-json-logger)\n A python library adding a json log formatter.\n- [requests](https://2.python-requests.org//en/master/)\n HTTP for Humans.\n- [uwsgi](https://uwsgi-docs.readthedocs.io/en/latest/)\n The uWSGI server.\n\nExtra dependencies (based on settings):\n\n- **cas**\n - [django-cas-ng](https://github.com/mingchen/django-cas-ng)\n Django CAS (Central Authentication Service) client. (**Above 3.6**)\n\n- **scheduler**\n - [django-rq](https://github.com/rq/django-rq)\n A simple app that provides django integration for RQ (Redis Queue).\n - [redis](https://github.com/andymccurdy/redis-py)\n The Python interface to the Redis key-value store.\n - [rq](https://github.com/rq/rq)\n Simple, lightweight, library for creating background jobs, and processing them.\n - [rq-scheduler](https://github.com/rq/rq-scheduler)\n Small package that adds job scheduling capabilities to RQ.\n\n- **server**\n - [sentry-sdk](https://github.com/getsentry/sentry-python)\n Python client for Sentry.\n\n- **storage**\n - [django-minio-storage](https://github.com/py-pa/django-minio-storage)\n A django storage driver for minio.\n - [django-storages](https://django-storages.readthedocs.io/en/latest/)\n A collection of custom storage backends for Django.\n Enabled for [boto3](https://github.com/boto/boto3) and\n [google-cloud-storage](https://github.com/googleapis/google-cloud-python).\n\n- **test**\n - [coverage](https://coverage.readthedocs.io/)\n A tool for measuring code coverage of Python programs.\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- **webpack**\n - [django-webpack-loader](https://github.com/owais/django-webpack-loader)\n Transparently use webpack with django.\n\n*[Return to TOC](#table-of-contents)*\n\n\n## Installation\n\n```bash\n# standalone\npip3 install django_eha_sdk\n\n# with extra dependencies\npip3 install django_eha_sdk[cas,scheduler,server,storage,test,webpack]\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## Tests\n\nHow to test the library\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\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\nAdd this snippet in the `settings.py` file to have the build the django app\nsettings based on the environment variables.\n\n```python\nfrom django_eha_sdk.conf.settings import * # noqa\n\n# continue with the app specific settings\n# and re-import the settings variables you need to reuse\n# from django_eha_sdk.conf.settings import WHATEVER YOU NEED TO...\n```\n\nAdd this snippet in the `urls.py` file to generate default `urlpatterns`\nbased on the app settings.\n\n```python\nfrom django_eha_sdk.conf.urls import generate_urlpatterns\n\n\nurlpatterns = generate_urlpatterns(token=True, app=[\n # include here the app specific urls\n])\n```\n\n*[Return to TOC](#table-of-contents)*\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/django-eha-sdk/", "keywords": "django,setup,auth,cas,token,keycloak,multitenancy", "license": "Apache2 License", "maintainer": "", "maintainer_email": "", "name": "django-eha-sdk", "package_url": "https://pypi.org/project/django-eha-sdk/", "platform": "", "project_url": "https://pypi.org/project/django-eha-sdk/", "project_urls": { "Homepage": "https://github.com/eHealthAfrica/django-eha-sdk/" }, "release_url": "https://pypi.org/project/django-eha-sdk/1.0.4/", "requires_dist": [ "django (>=2)", "django-cors-headers", "django-debug-toolbar", "django-prometheus", "django-uwsgi", "djangorestframework (>=3.8)", "drf-dynamic-fields", "psycopg2-binary", "pygments", "python-json-logger", "requests", "urllib3 (>=1.25)", "uwsgi", "django-cas-ng (>=3.6) ; extra == 'cas'", "django-rq ; extra == 'scheduler'", "redis ; extra == 'scheduler'", "rq ; extra == 'scheduler'", "rq-scheduler ; extra == 'scheduler'", "sentry-sdk ; extra == 'server'", "django-minio-storage ; extra == 'storage'", "django-storages[boto3,google] ; extra == 'storage'", "coverage ; extra == 'test'", "flake8 ; extra == 'test'", "flake8-quotes ; extra == 'test'", "tblib ; extra == 'test'", "django-webpack-loader ; extra == 'webpack'" ], "requires_python": ">=3.6", "summary": "A python library with helpful django tools", "version": "1.0.4" }, "last_serial": 5277983, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7b9525df1cdbd068eeed84159b9abd1e", "sha256": "b4b0f91ca8c7472cabf185f2d29404faaac50b61fcfa94e635bf8e4bc33688c8" }, "downloads": -1, "filename": "django_eha_sdk-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b9525df1cdbd068eeed84159b9abd1e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6", "size": 113327, "upload_time": "2019-05-09T14:30:08", "url": "https://files.pythonhosted.org/packages/97/f3/39514082ca45447e0a5dce40abe2dee0c6b60fea52b8003c0c634e344de0/django_eha_sdk-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "75164a38f1c6aa164b85f180b3f37124", "sha256": "2928c161c4235bb9eab287572dc827cf1b02b7539a1f398712510011072ddaaa" }, "downloads": -1, "filename": "django_eha_sdk-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "75164a38f1c6aa164b85f180b3f37124", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 113324, "upload_time": "2019-05-09T14:27:32", "url": "https://files.pythonhosted.org/packages/fc/22/373651cefb7ea2da7721b38d46450be36b3100f6b295650cc5b3e207917b/django_eha_sdk-1.0.1-py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "957e26effee1e0812b7d43e41130c958", "sha256": "193b1ce365622edfe4b5d131f72f8b3c77d5cf05df01759951f48e7a471ee9bc" }, "downloads": -1, "filename": "django_eha_sdk-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "957e26effee1e0812b7d43e41130c958", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 102735, "upload_time": "2019-05-13T13:54:14", "url": "https://files.pythonhosted.org/packages/a4/9b/0f4f19c88f5c1e9761a5e79a2a1ecd2eccdea93b3115747f1d2cba6dc20d/django_eha_sdk-1.0.2-py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "b8a4d30946d38f4d8b54e9787fd322b9", "sha256": "6d888c4cea319d3eb34f43e7f0522f713e18905bfd24f4e01d4f7dbf2d26ad73" }, "downloads": -1, "filename": "django_eha_sdk-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b8a4d30946d38f4d8b54e9787fd322b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 104067, "upload_time": "2019-05-16T14:17:00", "url": "https://files.pythonhosted.org/packages/65/f0/de93be8005d98e85e3f7016b0fd43929edf8ec8e1396920d98caa29f13dc/django_eha_sdk-1.0.3-py3-none-any.whl" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "86a1229b4e9d2e8fc7977542b0794899", "sha256": "5070074357085ab940394deabd2bc52bae71e2252dae132b1cfa45d7bbaf84d6" }, "downloads": -1, "filename": "django_eha_sdk-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "86a1229b4e9d2e8fc7977542b0794899", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 104070, "upload_time": "2019-05-16T15:29:28", "url": "https://files.pythonhosted.org/packages/9a/cf/66e1584f1422652caf87dbb730683c2c49c245119d263df2c70ea8cb5260/django_eha_sdk-1.0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86a1229b4e9d2e8fc7977542b0794899", "sha256": "5070074357085ab940394deabd2bc52bae71e2252dae132b1cfa45d7bbaf84d6" }, "downloads": -1, "filename": "django_eha_sdk-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "86a1229b4e9d2e8fc7977542b0794899", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 104070, "upload_time": "2019-05-16T15:29:28", "url": "https://files.pythonhosted.org/packages/9a/cf/66e1584f1422652caf87dbb730683c2c49c245119d263df2c70ea8cb5260/django_eha_sdk-1.0.4-py3-none-any.whl" } ] }