semvec/pypi-packages huggingface dataset:
enventory 0.0.3
A lightweight Python utility for loading and retrieving environment variables
License: MIT
Requires Python: >=3.8
Keywords: environment, env, dotenv, configuration, settings, environment-variables, config, utilities

# 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
bs4-token-ext 0.0.2
Add your description here
License: MIT
Requires Python: >=3.12
Keywords: beautifulsoup, llm, tiktoken, token, web-scraping

# bs4-token-ext
Add token counting capabilities to BeautifulSoup tags for LLM applications.
---
LLM（大規模言語モデル）向けに、BeautifulSoup のタグにトークン数をカウントする機能を追加する。
## Usage
```python
from bs4_token_ext import TokenAwareBeautifulSoup

html = "<div><p>Hello, world!</p></div>"
soup = TokenAwareBeautifulSoup(html, 'html.parser')
div = soup.find('div')
p = soup.find('p')

print(p.token_count) 
print(p.token_count_with_html)  
print(div.token_count)  
print(div.token_count_with_html)  
```