Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/34j/jinja2-env
Jinja2 Extension for getting environment variables
https://github.com/34j/jinja2-env
environment-variables jinja2 jinja2-extension
Last synced: 2 months ago
JSON representation
Jinja2 Extension for getting environment variables
- Host: GitHub
- URL: https://github.com/34j/jinja2-env
- Owner: 34j
- License: cc0-1.0
- Created: 2023-02-21T14:34:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T14:53:00.000Z (3 months ago)
- Last Synced: 2024-10-23T18:21:53.235Z (3 months ago)
- Topics: environment-variables, jinja2, jinja2-extension
- Language: Python
- Homepage:
- Size: 123 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# jinja2-env
Jinja2 Extension for getting environment variables
## Installation
Install this via pip (or your favourite package manager):
```shell
pip install jinja2-env
```## Usage
The extension class is `jinja2_env.EnvExtension`.
As a statement:
```jinja2
{% env "HOME" %}
{% env "HOME", default %}
```As a expression:
```jinja2
{{ "default" | env("HOME") }}
```## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!