Metadata-Version: 2.4
Name: qools
Version: 1.0.0
Summary: Utility tools from Qarium
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: pytest-cov>=5.0; extra == "test"
Requires-Dist: ruff>=0.15.0; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
Dynamic: license-file

# qools

Utility tools from Qarium

## Installation

```bash
pip install qools
```

## Quick Start

```python
from qools import funcutils

@funcutils.called_once
def init_connection():
    print("Connecting...")
    return "connected"

# First call — executes the function
result = init_connection()  # Connecting...

# Subsequent calls — return cached result without execution
result = init_connection()  # (no output, returns "connected")
```

## API

### `funcutils`

Submodule-style import: `from qools import funcutils`.

| Name | Description |
|------|-------------|
| `called_once(f)` | Thread-safe decorator. Ensures the function is called only once; subsequent calls return the cached result. |
| `DEFAULT_TIMEOUT` | Constant `5` |
| `DEFAULT_DELAY` | Constant `0.5` |

## Documentation

Full documentation: https://qarium.github.io/qools/
