Skip to main content

Utilities for use with the django web framework

Project description

djutils

Tools for use within the django framework

djutils provides tools for common actions within the django framework.

It includes tools for:

  • Administration interface
  • Cryptographics
  • Database interaction
  • Exceptions
  • HTTP Handling
  • IP-Address handling
  • Mixins for Classes

Installation

Use the python package manager pip to install djutils.

pip install djutils

Usage

Just an example how you could use the exceptions_to_http decorator. Each method defined in djutils has a small documentation with it.

from djutils import http, exceptions

@http.exceptions_to_http(exceptions.Error)
def my_route(request):
    if request.POST:
        raise exceptions.Error("POST is not allowed", code="no_post", status_code=403)

    return "Hello World"

License

GNU GPLv3, see LICENSE

Maintainer

This package is maintained by Manuel Stingl. For more information see https://opensource.voltane.eu

Project details


Download files

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

Files for djutils, version 1.0.12
Filename, size File type Python version Upload date Hashes
Filename, size djutils-1.0.12-py3-none-any.whl (22.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size djutils-1.0.12.tar.gz (7.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page