Metadata-Version: 2.0
Name: django-datadog-compatibility
Version: 0.0.1
Summary: A simple DataDog Integration for Django
Home-page: https://github.com/mypebble/django-datadog
Author: SF Software limited t/a Pebble
Author-email: sysadmin@mypebble.co.uk
License: MIT
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Framework :: Django
Requires-Dist: six
Requires-Dist: datadog
Requires-Dist: django


Django DataDog Integration
==========================

A simple DataDog Integration for Django. This app lets you set your integration
settings in and just call the compatibility wrapper functions. All
authentication is handled on your behalf.

Quickstart
----------

To get started, setup your DataDog Agent, then configure this app:

.. code-block:: bash

   pip install django-datadog-compatibility

Configure your ``settings.py`` with DataDog and StatsD:

.. code-block:: python

   DATADOG = {
     'ENABLED': True,
     'API_KEY': 'xxxx',
     'APP_KEY': 'xxxx',
   }

   STATSD_HOST = 'localhost'
   STATSD_PORT = '12345'

You're now able to call DataDog functions:

.. code-block:: python

   from django_datadog.compat import create_event, create_gauge

   create_event('example.com.my_event',
                fmt_text='Sample event %s',
                priority='normal',
                text_args=(request.user.email, ),
                tags=['app:example'])

   create_gauge('example.com.my_gauge', value=25)

And that's it!

Contributing
------------

We don't currently cover all of DataDog's functionality. If you'd like to
contribute, please open a Pull Request with the new function and a test case.

Add the function to ``django_datadog/compat.py``

Initializing
^^^^^^^^^^^^

To setup your function, you usually want to initialize DataDog:

.. code-block:: python

   from datadog import some_function

   from django_datadog.utils import init_datadog

   def my_custom_function():
       if init_datadog():
           some_function()


