Skip to main content

JSON secrets to Django settings module

Project description

JSON secrets to Django settings module

Setup

  • install it via pip install django-json-secrets

Usage

  • Setup ‘SECRET_DIR’ to settings module

    SECRETS_DIR = os.path.join(ROOT_DIR, '.secrets')
  • Import library function

    from djs import import_secrets
  • Execute function

    import_secrets()
  • If there is a Python module needed to eval() the value of the secrets, define it in SECRETS_MODULES

    import requests
    
    SECRETS_MODULES = {
        'raven': 'raven',
        'requests': requests,
    }

Contributing

As an open source project, we welcome contributions.

The code lives on github.

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

django-json-secrets-0.1.11.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file django-json-secrets-0.1.11.tar.gz.

File metadata

File hashes

Hashes for django-json-secrets-0.1.11.tar.gz
Algorithm Hash digest
SHA256 f00f6de6e29c00e188ff0669316b9f56041287cbfe3d9813fefd1fd070d7f86c
MD5 d2962bd2c17b6377ec013e9d4d3a26e6
BLAKE2b-256 0563f105f63ef5e7c70eef1d77abe2f5a7eec34011f2b65c435b9b483af06b37

See more details on using hashes here.

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