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

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.

Source Distribution

djutils-1.0.2.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

djutils-1.0.2-py3-none-any.whl (19.8 kB view hashes)

Uploaded Python 3

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