This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

API offering health metrics for the Django Server Guardian app.

Installation and Usage

To get the latest stable release from PyPi

pip install django-server-guardian-api

To get the latest commit from GitHub

pip install -e git+git://github.com/bitmazk/django-server-guardian-api.git#egg=server_guardian_api

Add server_guardian_api to your INSTALLED_APPS

INSTALLED_APPS = (
    ...,
    'server_guardian_api',
)

Add the server_guardian_api URLs to your urls.py

urlpatterns = [
    url(r'^server-guardian-api/', include('server_guardian_api.urls')),
]

As a simple auth method add the security token as described in the README of the Django Server Guardian to your settings as SERVER_GUARDIAN_SECURITY_TOKEN

SERVER_GUARDIAN_SECURITY_TOKEN = 'asd0hb42t92-example-token-39gh1g3-91hfosj325'

Add the SERVER_GUARDIAN_PROCESSORS setting where you’re endpoint metrics are defined.

SERVER_GUARDIAN_PROCESSORS = (
    'server_guardian_api.endpoints.mailer_mail',
    'myapp.mymodule.myfunction',
)

The functions defined in this setting must return a dictionary in the following format

{
    'status': 'OK', # must be one of: "OK", "WARNING", "DANGER"
    'info': 'additional text describing the status. e.g. type of error',
}

That mean, your API endpoint will, if all is correct, return something like this

[
    {
        'label': 'mail_queue',
        'status': 'OK',
        'info': "No deferred email queued. That's great!",
    },
    {
        'label': 'other_metric',
        ...
    },
]

Contribute

If you want to contribute to this project, please perform the following steps

# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 django-server-guardian-api
make develop

git co -b feature_branch master
# Implement your feature and tests
git add . && git commit
git push -u origin feature_branch
# Send us a pull request for your feature branch

In order to run the tests, simply execute tox. This will install two new environments (for Django 1.8 and Django 1.9) and run the tests against both environments.

Release History

Release History

0.1.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-server-guardian-api-0.1.2.tar.gz (7.8 kB) Copy SHA256 Checksum SHA256 Source May 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting