Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 74 additions & 60 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,233 +1,247 @@
# Changelog

## v1.3.0 (2025-06-06)

### Features

- add subcommands to better handle different use cases

### Chore

- **changelog:** write CHANGELOG.md for version v1.3.0

## v1.2.5 (2025-06-05)

### Fixes

- add python 3.13 as list of supported versions
- add python 3.13 as list of supported versions

### Chore

- **changelog:** write CHANGELOG.md for version v1.2.5

## v1.2.4 (2025-05-07)

### Fixes

- allow for # in comments, closes: #9
- allow for # in comments, closes: #9

### Chore

- **changelog:** write CHANGELOG.md for version v1.2.3
- **changelog:** write CHANGELOG.md for version v1.2.3
- **changelog:** write CHANGELOG.md for version v1.2.3
- **changelog:** write CHANGELOG.md for version v1.2.3

## v1.2.3 (2025-01-06)

### Fixes

- typo in `--strip-prefix` cli option
- typo in `--strip-prefix` cli option

### Chore

- rewrite CHANGELOG.md
- **changelog:** write CHANGELOG.md for version v1.2.3
- rewrite CHANGELOG.md
- **changelog:** write CHANGELOG.md for version v1.2.3

### CI

- Run tests using uv + hatch
- Run tests using uv + hatch

### Dev

- upgrade flake.nix to self-contain without .venv
- upgrade flake.nix to self-contain without .venv

### Docs

- fix path to requirements in .readthedocs.yaml
- add .readthedocs.yaml to re-enable readthedocs integration
- change artificial commits for v1.0.0 - split into separate files
- update README.md
- fix `--dry_run` to `--dry-run` in docs, along with single mispell
- fix path to requirements in .readthedocs.yaml
- add .readthedocs.yaml to re-enable readthedocs integration
- change artificial commits for v1.0.0 - split into separate files
- update README.md
- fix `--dry_run` to `--dry-run` in docs, along with single mispell

### Style

- Move project into src, update flake.nix, Makefile & pyproject.toml with newest hatch layout.
- Move project into src, update flake.nix, Makefile & pyproject.toml with newest hatch layout.

### Test

- exclude windows tests for 3.7 - has problem with hatch.exe
- change pinned version for devel
- change pytest version for python 3.7
- change python-cov version for python 3.7
- change mypy to 1.4.1 because of python 3.7
- Fix tests for python >= 3.8 (annotations)
- exclude windows tests for 3.7 - has problem with hatch.exe
- change pinned version for devel
- change pytest version for python 3.7
- change python-cov version for python 3.7
- change mypy to 1.4.1 because of python 3.7
- Fix tests for python >= 3.8 (annotations)

## v1.2.2 (2024-10-04)

### Fixes

- change `--dry_run` into valid `--dry-run` option
- change `--dry_run` into valid `--dry-run` option

### Chore

- **changelog:** write CHANGELOG.md for version v1.2.2
- **changelog:** write CHANGELOG.md for version v1.2.2

## v1.2.1 (2024-10-03)

### Features

- bring back python 3.7
- bring back python 3.7

### Chore

- **changelog:** write CHANGELOG.md for version v1.2.0
- **changelog:** write CHANGELOG.md for version v1.2.0
- **changelog:** write CHANGELOG.md for version v1.2.0
- **changelog:** write CHANGELOG.md for version v1.2.0

### Docs

- remove ./docs in favor of README.md, convert *.rst to markdown versions
- add CHANGELOG.md to the header tagble
- add CHANGELOG.md to README.md file
- remove ./docs in favor of README.md, convert *.rst to markdown versions
- add CHANGELOG.md to the header tagble
- add CHANGELOG.md to README.md file

### Style

- remove empty line after TestRunenv cause tests on python 3.7 are complaining
- remove empty line after TestRunenv cause tests on python 3.7 are complaining

## v1.2.0 (2024-10-03)

### Features

- add support for ${VARIABLES} and support --prefix, --stip-prefix, --verbosity 1,2,3, --dry-run at command line
- add support for ${VARIABLES} and support --prefix, --stip-prefix, --verbosity 1,2,3, --dry-run at command line

### Chore

- **changelog:** write CHANGELOG.md for version v1.2.0
- **changelog:** write CHANGELOG.md for version v1.2.0

### Docs

- rewrite README.md from scratch, providing python API fresh documentation, along wiht CLI usage
- add CHANGELOG.md
- rewrite README.md from scratch, providing python API fresh documentation, along wiht CLI usage
- add CHANGELOG.md

## v1.1.2 (2024-10-03)

### Fixes

- remove distutils in favor of shutil to support python 3.12
- remove distutils in favor of shutil to support python 3.12

### Build

- remove official support for python <=3.8
- remove official support for python <=3.8

### Docs

- update readme
- update readme

### Style

- fix ruff errors, and remove 2.7 python from travis
- fix ruff errors, and remove 2.7 python from travis

## v1.1.1 (2024-10-03)

### Features

- migrate to pyproject.toml
- add newest python versions to .travis.yml/tox.ini
- migrate to pyproject.toml
- add newest python versions to .travis.yml/tox.ini

### Fixes

- support inline comments in .env files
- readme.rst
- get back README.rst
- **doc:** README.md title
- support inline comments in .env files
- readme.rst
- get back README.rst
- **doc:** README.md title

## v1.0.1 (2017-02-03)

### Docs

- fix syntax error in README.md file
- fix syntax error in README.md file

## v1.0.0 (2017-02-03)

### Features

- add support python 3.5
- add support python 3.5

### Docs

- refine README.md
- refine README.md

## v0.4.0 (2016-08-08)

### Features

- add support for `search_parent` option to find .env files in parent directories
- add support for `search_parent` option to find .env files in parent directories

## v0.3.1 (2016-06-21)

### Features

- add support for quoting values in .env files
- add support for quoting values in .env files

## v0.3.0 (2016-02-14)

### Build

- mark runenv as stable project
- mark runenv as stable project

## v0.2.5 (2015-11-30)

## v0.2.4 (2015-07-06)

### Features

- skip `load_env` if env file does not exists without failing
- skip `load_env` if env file does not exists without failing

## v0.2.3 (2015-06-26)

### Features

- support to run commands without explicite path, using PATH environment variable to find them
- support to run commands without explicite path, using PATH environment variable to find them

## v0.2.2 (2015-06-16)

### Fixes

- support python 3.x
- support python 3.x

## v0.2.1 (2015-06-16)

### Features

- add `strip-prefix` to the `load_env` python API function
- add `strip-prefix` to the `load_env` python API function

## v0.2.0 (2015-06-16)

### Features

- add `load_env` python API function
- add `load_env` python API function

## v0.1.4 (2015-06-15)

### Features

- check whether executable exists before run it
- check whether executable exists before run it

## v0.1.3 (2015-06-01)

### Features

- add support for commened lines with # in .env files
- add support for commened lines with # in .env files

## v0.1.2 (2015-06-01)

### Features

- return exit code from runned command
- return exit code from runned command

## v0.1.1 (2015-05-31)

### Fixes

- make runvenv work with many parameters for command
- make runvenv work with many parameters for command

## v0.1.0 (2015-05-31)

### Features

- Initial version of runenv
- Initial version of runenv

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package:
.PHONY: test
test:
hatch run test
hatch run coverage report -m --fail-under=100
hatch run coverage report -m --fail-under=90


.PHONY: test-all
Expand Down
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Manage application settings with ease using `runenv`, a lightweight tool inspire
- 🚀 **CLI-First**: Use `.env` files across any language or platform.
- 🐍 **Python-native API**: Load and transform environment settings inside Python.
- ⚙️ **Multiple Profiles**: Switch easily between `.env.dev`, `.env.prod`, etc.
- ⚙️ **Multiple Formats**: Use plain `.env`, `.env.json`, `.env.toml`, or `.env.yaml`
- ⚙️ **Autodetect Env File**: Looking for `.env`, `.env.json`, `.env.toml`, and `.env.yaml`
- 🧩 **Framework-Friendly**: Works well with Django, Flask, FastAPI, and more.

---
Expand All @@ -48,28 +50,21 @@ Manage application settings with ease using `runenv`, a lightweight tool inspire

```bash
pip install runenv
pip install runenv[toml] # if you want to use .env.toml in python < 3.11
pip install runenv[yaml] # if you want to use .env.yaml
```

### CLI Usage

Run any command with a specified environment:

```bash
runenv .env.dev python manage.py runserver
runenv .env.prod uvicorn app:app --host 0.0.0.0
runenv run --env-file .env.dev -- python manage.py runserver
runenv run --env-file .env.prod -- uvicorn app:app --host 0.0.0.0
runenv list [--env-file .env] # view parsed variables
runenv lint [--env-file .env] # check common errors in env file
```

View options:

```bash
runenv --help
```

Key CLI features:
- `--prefix`, `--strip-prefix`: Use selective environments
- `--dry-run`: Inspect loaded environment
- `-v`: Verbosity control

---

## Python API
Expand All @@ -83,11 +78,12 @@ from runenv import load_env

load_env() # loads .env
load_env(
env_file=".env.dev", # file to load
prefix='APP_', # load only APP_.* variables from file
strip_prefix=True, # strip ^ prefix when loading variables
force=True, # load env_file even if the `runvenv` CLI was used
search_parent=1 # look for env_file in current dir and its parent dir
env_file=".env.dev", # file to load - will be autodetected if not passed
prefix='APP_', # load only APP_.* variables from file
strip_prefix=True, # strip ^ prefix when loading variables
force=True, # load env_file even if the `runvenv` CLI was used
search_parent=1, # look for env_file in current dir and its 1 parent dirs
require_env_file=False # raise error if env file is missing, otherwise just ignore
)
```

Expand All @@ -98,9 +94,10 @@ from runenv import create_env

config = create_env() # parse .env content into dictionary
config = create_env(
env_file=".env.dev", # file to load
prefix='APP_', # parse only APP_.* variables from file
strip_prefix=True, # strip ^ prefix when parsing variables
env_file=".env.dev", # file to load - will be autodetected if not passed
prefix='APP_', # parse only APP_.* variables from file
strip_prefix=True, # strip ^ prefix when parsing variables
search_parent=1, # look for env_file in current dir and its 1 parent dirs
)
print(config)
```
Expand Down
Loading
Loading