Python Sync Dotenv ♻️
Python Sync Dotenv is a Python package for synchronizing .env files across projects using command-line interfaces.
Free software: MIT license
Documentation: https://py-sync-dotenv.readthedocs.io.
Installation
$ pip install py-sync-dotenv
Usage
By default, py-sync-dotenv tries to locate the source .env file with the name .env from the current working directory.
$ py-sync-dotenvThis behavior can be modified by providing the source .env file path using the -s, --source option.
$ py-sync-dotenv -s .env.source #OR $ py-sync-dotenv --source .env.sourceAnother option that can be supplied is the -d, --destination-env which is used to provide the path to the destination .env file. The below commands synchronizes the source .env file with the specified destination env file - .env.dev
$ py-sync-dotenv -d .env.dev #OR $ py-sync-dotenv --destination-env .env.dev``Likewise, there is the -ds, --destination-envs option which is used to provide the directory containing the destination .env file(s). The below commands synchronizes the source .env file with all the .env files contained in the specified directory.
$ py-sync-dotenv -ds dev_envs/ #OR $ py-sync-dotenv --destination-envs dev_envs/``Futhermore, to all the above options, you can specify the --just-variable flag to indicates to the engine to synchronize just the variables.
$ py-sync-dotenv -d .env.dev --just-variables # Source --------------------> destination # SQL_HOST=127.0.0.1 --------> SQL_HOST= # SQL_PORT=5432 --------> SQL_PORT=
Command
The watch command can be used to auto synchronize the source .env file [on file changed/modified] with the specified destination file(s).
$ py-sync-dotenv -s .env.source -d .env.dev watchCoupled with the watch command is the --show-logs flag, which is used to show file changes logs as they occur.
$ py-sync-dotenv -d .env.dev watch --show-logs
Options
Type |
Option |
Description |
|---|---|---|
FILE |
-s, –source |
Source .env file to use in populating other .env files [default: .env]. |
FILE |
-d, –destination-env |
.env file for destination stage. |
DIRECTORY |
-ds, –destination-envs |
Directory path to .env files for destination stage. |
Flags
Type |
Flag |
Description |
|---|---|---|
FLAG |
–just-variables |
indicates to the engine to synchronize just the variables. |
FLAG |
–show-logs |
show file changes logs as they occur. To be used with the watch command |
FLAG |
–help |
Show this message and exit. |
Commands
Type |
Command |
Description |
|---|---|---|
COMMAND |
watch |
indicates to the engine to auto synchronize the source .env file [on file changed/modified] with the specified destination file(s). |
Credits
This package was created with Cookiecutter and the cookiecutter-pypackage project template.
History
0.1.0 (2021-03-19)
First release on PyPI.
Metadata
Release files for py-sync-dotenv 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| py_sync_dotenv-0.1.3.tar.gz | 12.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_sync_dotenv-0.1.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / py_sync_dotenv-0.1.3.tar.gz
| Download URL | py_sync_dotenv-0.1.3.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d33bf872390aeb2db732e5b8e2ea06a65cec9b5dbea00a6d6ffce8c0056d665
|
|
BLAKE2b-256 checksum How to use checksums |
a85f15062a542a578e263854f3fa63411f9249697026884a0126d46af6e312c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / py_sync_dotenv-0.1.3-py2.py3-none-any.whl
| Download URL | py_sync_dotenv-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fe27c9b05661752a97ef4f2157d7d2dc87a490b3481cc760619bf0a5d8b91ae1
|
|
BLAKE2b-256 checksum How to use checksums |
62c5d957f8e9baac2e4f0a6d0313668b9b6d943f9fd8dd223f49115dc9914063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for py-sync-dotenv 0.1.3
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.