Skip to main content

Wrapper for converting environment variables to any python type

Project description

gnvext

Wrapper for converting environment variables to any python type


Installing

Python 3.10+ is required

[!NOTE] It's recommended to activate Virtual Environment before installing gnvext

To clone and install required packages use the following command:

# linux/macOS
$ python3 -m pip install gnvext

# windows
$ py -3 -m pip install gnvext

Also, gnvext may be cloned from GitHub:

$ git clone https://github.com/DouleLove/gnvext

Usage example

import gnvext
import django

# let's assume we have DJANGO_ALLOWED_HOSTS environment variable
# which we want to extract and convert to list.
# If it does not exist, ['*'] will be returned

ALLOWED_HOSTS = gnvext.CollectionEnvVariable(
    'DJANGO_ALLOWED_HOSTS',
    ['*'],
).value

...  # django project settings.py stuff here

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

gnvext-1.1.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gnvext-1.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file gnvext-1.1.1.tar.gz.

File metadata

  • Download URL: gnvext-1.1.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for gnvext-1.1.1.tar.gz
Algorithm Hash digest
SHA256 852a84a1fa1f65ba2d09ea717181043e4d378e46b02d0bc87b2507442ffa2076
MD5 64c5e8a652b552d094b62034e306b3f3
BLAKE2b-256 6e7db951ef88ab6b4ffd313e685e7987c23ae33861357f51bdcd7c31171c8ae8

See more details on using hashes here.

File details

Details for the file gnvext-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: gnvext-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for gnvext-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f6d33c902c5bafacb29bf3022392075349f0e0e17875af8cff087eab1311b9
MD5 375a597c25bf72a2e38fdacfd0d471ba
BLAKE2b-256 bd19bf1e45f9c4d99472f5336f7803b54fa1e32f820b866afdcae353702d7497

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page