Skip to main content

A python library with helpful django tools

Project description

Django eHealth SDK

This library contains the most common features used by the different eHealth django apps.

Table of contents


This library requires Python 3.6 and above.

Python libraries:

  • django As web framework. (Above 2)
  • django-cors-headers for handling the server headers required for Cross-Origin Resource Sharing (CORS).
  • django-debug-toolbar A configurable set of panels that display various debug information about the current request/response.
  • django-prometheus to monitor the application with
  • django-uwsgi Django related examples/tricks/modules for uWSGI.
  • djangorestframework A powerful and flexible toolkit for building Web APIs. (Above 3.8)
  • drf-dynamic-fields Dynamically select only a subset of fields per DRF resource, either using a whitelist or a blacklist.
  • psycopg2-binary Python-PostgreSQL Database Adapter.
  • pygments A syntax highlighting package written in Python.
  • python-json-logger A python library adding a json log formatter.
  • requests HTTP for Humans.
  • uwsgi The uWSGI server.

Extra dependencies (based on settings):

  • cas

    • django-cas-ng Django CAS (Central Authentication Service) client. (Above 3.6)
  • scheduler

    • django-rq A simple app that provides django integration for RQ (Redis Queue).
    • redis The Python interface to the Redis key-value store.
    • rq Simple, lightweight, library for creating background jobs, and processing them.
    • rq-scheduler Small package that adds job scheduling capabilities to RQ.
  • server

  • storage

  • test

    • coverage A tool for measuring code coverage of Python programs.
    • flake8 Tool For Style Guide Enforcement.
    • flake8-quotes Flake8 extension for checking quotes in python.
    • tblib Traceback serialization library.
  • webpack

Return to TOC


# standalone
pip3 install django_eha_sdk

# with extra dependencies
pip3 install django_eha_sdk[cas,scheduler,server,storage,test,webpack]

Return to TOC


How to create the package distribution

Execute the following command:

python3 bdist_wheel



Return to TOC


How to test the library

First install dependencies (execute it only once):


After that execute the following command:

source ./venv/bin/activate

The file scripts/test.ini contains the environment variables used in the tests.

Return to TOC


Add this snippet in the file to have the build the django app settings based on the environment variables.

from django_eha_sdk.conf.settings import *  # noqa

# continue with the app specific settings
# and re-import the settings variables you need to reuse
# from django_eha_sdk.conf.settings import WHATEVER YOU NEED TO...

Add this snippet in the file to generate default urlpatterns based on the app settings.

from django_eha_sdk.conf.urls import generate_urlpatterns

urlpatterns = generate_urlpatterns(token=True, app=[
    # include here the app specific urls

Return to TOC

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_eha_sdk-1.0.3-py3-none-any.whl (104.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page