Skip to main content

djangofu

by John Mark Schofield (jms@schof.org)

Provides common utility functions for Django projects.

(It’s django-fu as in Kung Fu, not as in F-U.)

Currently provides django-fu.djangoenvironment.get_env_variable().

Loads an environment variable into the current context, or raises an exception.

Usage:

>>> from djangofu.general import get_env_variable
>>> get_env_variable('SHELL')
'/bin/bash'
>>> get_env_variable('foobar')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/schof/.virtualenvs/dbfweb/lib/python2.7/site-packages/djangofu/general.py", line 12, in get_env_variable
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the foobar environment variable
>>>

Thanks

get_env_variable was taken from the book “Two Scoops of Django,” by Daniel Greenfield and Audrey Roy. [https://django.2scoops.org/]

Metadata

Release files for djangofu 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangofu 0.0.6
File Size Uploaded Provenance Actions
djangofu-0.0.6.tar.gz 1.3 kB Without provenance Details for djangofu-0.0.6.tar.gz

Release files / djangofu-0.0.6.tar.gz

Download URL djangofu-0.0.6.tar.gz
Size 1.3 kB
Tags Source
SHA-256 checksum
How to use checksums
643c9fc5a6b5251f5ac3e79410949bd63369c9e495c7cdfa424a948f3ba6908d
BLAKE2b-256 checksum
How to use checksums
3bebe1ee914b5d490201519627f5e5ac3a9660135d501ef12cc9f0bc15a784c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for djangofu 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page