Name | dotenver JSON |
Version |
1.3.0
JSON |
| download |
home_page | |
Summary | Automatically generate .env files from .env.example template files |
upload_time | 2023-07-11 14:03:44 |
maintainer | |
docs_url | None |
author | |
requires_python | <4.0,>=3.7 |
license | BSD-3-Clause |
keywords |
dotenv
template
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
============================
Python DotEnver
============================
.. image:: https://badge.fury.io/py/dotenver.svg
:target: https://badge.fury.io/py/dotenver
.. image:: https://github.com/jmfederico/dotenver/actions/workflows/tests.yml/badge.svg
:target: https://github.com/jmfederico/dotenver/actions/workflows/tests.yml
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
A Python app to generate dotenv (.env) files from templates.
Features
--------
* Automatic .env file generation from .env.example files
* Useful for CI or Docker deployments
* Uses Jinja2_ as rendering engine
* Uses Faker_ for value generation
Quickstart
----------
1. Install **Python DotEnver**
.. code-block:: console
$ pip install dotenver
2. Create a **.env.example** following this example
.. code-block:: ini
# Full line comments will be kept
# Simple usage
NAME= ## dotenver:first_name
# Pass parameters to fakers
ENABLED= ## dotenver:boolean(chance_of_getting_true=50)
# Name your values
MYSQL_PASSWORD= ## dotenver:password:my_password(length=20)
# And get the same value again, when the name is repeated.
DB_PASSWORD= ## dotenver:password:my_password()
# Output your values within double or single quotes
DOUBLE_QUOTED= ## dotenver:last_name(quotes='"')
SINGLE_QUOTED= ## dotenver:last_name(quotes="'")
# Literal values are possible
STATIC_VARIABLE=static value
# export syntax can be used
export EXPORTED_VARIABLE=exported
3. Run python **DotEnver** form the CLI
.. code-block:: console
$ dotenver -r
4. You now have a new **.env** file ready to use.
5. For more usage options run
.. code-block:: console
$ dotenver -h
Docker
------
A Docker image `is provided <Dotenver image_>`_. To use it, mount your source code to
`/var/lib/dotenver/` and run the container.
.. code-block:: console
$ docker run -ti --rm -v "${PWD}:/var/lib/dotenver/" jmfederico/dotenver
.. _Faker: https://faker.readthedocs.io
.. _Jinja2: http://jinja.pocoo.org
.. _jmfederico: https://github.com/jmfederico
.. _`Dotenver image`: https://hub.docker.com/r/jmfederico/dotenver
Raw data
{
"_id": null,
"home_page": "",
"name": "dotenver",
"maintainer": "",
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": "",
"keywords": "dotenv template",
"author": "",
"author_email": "Federico Jaramillo Mart\u00ednez <federicojaramillom@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/2e/92/472a6d304d40cb98527f39ac7f1cf37e6f0c9d32f1188a9c18140e9fc0f6/dotenver-1.3.0.tar.gz",
"platform": null,
"description": "============================\nPython DotEnver\n============================\n\n.. image:: https://badge.fury.io/py/dotenver.svg\n :target: https://badge.fury.io/py/dotenver\n\n.. image:: https://github.com/jmfederico/dotenver/actions/workflows/tests.yml/badge.svg\n :target: https://github.com/jmfederico/dotenver/actions/workflows/tests.yml\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\nA Python app to generate dotenv (.env) files from templates.\n\n\nFeatures\n--------\n\n* Automatic .env file generation from .env.example files\n* Useful for CI or Docker deployments\n* Uses Jinja2_ as rendering engine\n* Uses Faker_ for value generation\n\n\nQuickstart\n----------\n\n1. Install **Python DotEnver**\n\n .. code-block:: console\n\n $ pip install dotenver\n\n2. Create a **.env.example** following this example\n\n .. code-block:: ini\n\n # Full line comments will be kept\n\n # Simple usage\n NAME= ## dotenver:first_name\n\n # Pass parameters to fakers\n ENABLED= ## dotenver:boolean(chance_of_getting_true=50)\n\n # Name your values\n MYSQL_PASSWORD= ## dotenver:password:my_password(length=20)\n # And get the same value again, when the name is repeated.\n DB_PASSWORD= ## dotenver:password:my_password()\n\n # Output your values within double or single quotes\n DOUBLE_QUOTED= ## dotenver:last_name(quotes='\"')\n SINGLE_QUOTED= ## dotenver:last_name(quotes=\"'\")\n\n # Literal values are possible\n STATIC_VARIABLE=static value\n\n # export syntax can be used\n export EXPORTED_VARIABLE=exported\n\n3. Run python **DotEnver** form the CLI\n\n .. code-block:: console\n\n $ dotenver -r\n\n4. You now have a new **.env** file ready to use.\n\n5. For more usage options run\n\n .. code-block:: console\n\n $ dotenver -h\n\n\nDocker\n------\n\nA Docker image `is provided <Dotenver image_>`_. To use it, mount your source code to\n`/var/lib/dotenver/` and run the container.\n\n.. code-block:: console\n\n $ docker run -ti --rm -v \"${PWD}:/var/lib/dotenver/\" jmfederico/dotenver\n\n.. _Faker: https://faker.readthedocs.io\n.. _Jinja2: http://jinja.pocoo.org\n.. _jmfederico: https://github.com/jmfederico\n.. _`Dotenver image`: https://hub.docker.com/r/jmfederico/dotenver\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Automatically generate .env files from .env.example template files",
"version": "1.3.0",
"project_urls": {
"Repository": "https://github.com/jmfederico/dotenver"
},
"split_keywords": [
"dotenv",
"template"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0e938c17013a1ee0f35db60e6e4ff73804759c17eec102fe0ffa74aa7f817698",
"md5": "65f3668c2a67aee85bff415fc6215c3b",
"sha256": "a6a1bad980ffd9e0f29539b82221b2088771c06bcfae1105eda0a9579b425ed6"
},
"downloads": -1,
"filename": "dotenver-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65f3668c2a67aee85bff415fc6215c3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 7162,
"upload_time": "2023-07-11T14:03:42",
"upload_time_iso_8601": "2023-07-11T14:03:42.757378Z",
"url": "https://files.pythonhosted.org/packages/0e/93/8c17013a1ee0f35db60e6e4ff73804759c17eec102fe0ffa74aa7f817698/dotenver-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2e92472a6d304d40cb98527f39ac7f1cf37e6f0c9d32f1188a9c18140e9fc0f6",
"md5": "5f59fbec16a7652462c4a7b981031783",
"sha256": "d6e49c7ec11ed3d8b760463349da3179c833ea4c899fd0c52e2b4d3edc689992"
},
"downloads": -1,
"filename": "dotenver-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "5f59fbec16a7652462c4a7b981031783",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 8213,
"upload_time": "2023-07-11T14:03:44",
"upload_time_iso_8601": "2023-07-11T14:03:44.160495Z",
"url": "https://files.pythonhosted.org/packages/2e/92/472a6d304d40cb98527f39ac7f1cf37e6f0c9d32f1188a9c18140e9fc0f6/dotenver-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-11 14:03:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jmfederico",
"github_project": "dotenver",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "dotenver"
}