Metadata-Version: 2.4
Name: enventory
Version: 0.0.3
Summary: A lightweight Python utility for loading and retrieving environment variables
Home-page: https://github.com/becurrie/enventory
Author: Bec
Author-email: 
License: MIT
Project-URL: Bug Reports, https://github.com/becurrie/enventory/issues
Project-URL: Source, https://github.com/becurrie/enventory
Project-URL: Documentation, https://github.com/becurrie/enventory#readme
Keywords: environment,env,dotenv,configuration,settings,environment-variables,config,utilities
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# Enventory

**Enventory** is a lightweight Python utility for accessing environment variables from the system with optional type casting, defaults, and required flags.

---

## Features

* Access environment variables from the system with simple, clean API.
* Retrieve environment variables with default values, type casting, and required checks.
* Helper functions for casting strings to booleans or lists.
* Raises clear errors when required environment variables are missing.
* Compatible with Python 3.8+.

---

## Installation

Once published to PyPI, you can install Enventory via pip:

```bash
pip install enventory
```

Or for local development:

```bash
git clone https://github.com/yourusername/enventory.git
cd enventory
pip install -e .
```


---

## Usage

### Access Environment Variables

```python
from enventory import getenv, to_boolean, to_list

# Get a variable with optional default
db_host = getenv("DB_HOST", default="localhost")

# Get a required variable (raises ValueError if missing)
secret_key = getenv("SECRET_KEY", required=True)

# Cast a variable to boolean
debug_mode = getenv("DEBUG", default="False", cast=to_boolean)

# Cast a comma-separated variable to a list
allowed_hosts = getenv("ALLOWED_HOSTS", default="", cast=to_list)
```

### Helper Functions

```python
from enventory import to_boolean, to_list

to_boolean("yes")  # True
to_boolean("0")    # False

to_list("a,b,c")   # ['a', 'b', 'c']
to_list("a;b;c", separator=";")  # ['a', 'b', 'c']
```

---

## Error Handling

* `ValueError` is raised by `getenv` if a required environment variable is missing.

---

## Project Structure

```
enventory/
├── setup.py
├── pyproject.toml
├── README.md
└── enventory/
    ├── __init__.py  # exposes env.py
    └── env.py       # main environment utility
```

---

## Contributing

Contributions, issues, and feature requests are welcome!

1. Fork the repository
2. Create a new branch (`git checkout -b feature-name`)
3. Make your changes
4. Submit a pull request

---

## License

MIT License © Your Name

---


---

## Compatibility

* Python 3.8 and above
