Metadata-Version: 2.4
Name: pystrict-env
Version: 0.1.2
Summary: A strict, zero-dependency environment variable parser for Python.
Project-URL: Homepage, https://github.com/hiyiuki/pystrict-env
Project-URL: Repository, https://github.com/hiyiuki/pystrict-env
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# strict-env

A strict, zero-dependency environment variable parser for Python.

- No silent coercion
- Invalid values fail immediately
- Missing values are handled explicitly

## Install

```sh
pip install pystrict-env
```

## Usage

```python
import strict_env

# get_bool: missing -> default, invalid -> ValueError
debug = strict_env.get_bool("DEBUG", default=False)

# require_int: missing -> KeyError, invalid -> ValueError
port = strict_env.require_int("PORT")
```

## Parsing rules

Booleans are matched case-insensitively:

- true values: `1`, `true`, `yes`, `on`
- false values: `0`, `false`, `no`, `off`

Integers are plain digits with an optional leading `-`:

- valid: `42`, `-7`
- invalid: `3.14`, `1_000`, `abc`
