Django Dandelion

Version Build Codecov Requirements Status Issues Py versions License

Use the Dandelion API with Django

Documentation

The full documentation is at https://django-dandelion.readthedocs.io.

Quickstart

Install Django Dandelion:

$ pip install django-dandelion

Add django_dandelion to your INSTALLED_APPS

INSTALLED_APPS = [
    # ...
    'django_dandelion',
]

Add the entry DANDELION_TOKEN. The recommended method is to setup your production keys using environment variables. This helps to keep them more secure. Your test keys can be displayed in your code directly.

The following entry look for your DANDELION_TOKEN in your environment and, if it can’t find them,uses your test keys values instead:

DANDELION_TOKEN = os.environ.get("DANDELION_TOKEN", "<your dandelion token>")

Register on dandelion to obtain your authentication keys and enrich your application with our semantic intelligence.

You can also change the url of the host and decide whether to use the cache:

DANDELION_HOST = 'api.dandelion.eu'  # Default 'api.dandelion.eu'
DANDELION_USE_CACHE = True  # Default True

Running Tests

Does the code actually work?

# Add "export DANDELION_TOKEN=<your dandelion token>" to <YOURVIRTUALENV>/bin/activate
$ source <YOURVIRTUALENV>/bin/activate
$ (myenv) $ pip install tox
$ (myenv) $ tox