Metadata-Version: 2.4
Name: forge-kaif
Version: 0.4.0
Summary: A modular Python infrastructure runtime for config, logging, retries, AI, and more
Project-URL: Homepage, https://github.com/kaif-ai-engineer/forge-kaif
Project-URL: Documentation, https://useforge.dev/docs
Project-URL: Repository, https://github.com/kaif-ai-engineer/forge-kaif
Project-URL: Changelog, https://github.com/kaif-ai-engineer/forge-kaif/blob/main/CHANGELOG.md
Author-email: kaif-ai-engineer <hello@useforge.dev>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,config,framework,infrastructure,logging,retry,runtime
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Requires-Dist: fastapi>=0.110
Requires-Dist: jinja2>=3.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: typer>=0.12
Provides-Extra: all
Requires-Dist: anthropic>=0.20; extra == 'all'
Requires-Dist: azure-storage-blob>=12.0; extra == 'all'
Requires-Dist: boto3>=1.28; extra == 'all'
Requires-Dist: google-cloud-storage>=2.0; extra == 'all'
Requires-Dist: google-generativeai>=0.5; extra == 'all'
Requires-Dist: httpx>=0.27; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
Requires-Dist: redis>=5.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.20; extra == 'anthropic'
Provides-Extra: azure
Requires-Dist: azure-storage-blob>=12.0; extra == 'azure'
Provides-Extra: dev
Requires-Dist: coverage>=7.6; extra == 'dev'
Requires-Dist: email-validator>=2.0; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pre-commit>=4.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-benchmark>=5.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-timeout>=2.3; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Provides-Extra: gcs
Requires-Dist: google-cloud-storage>=2.0; extra == 'gcs'
Provides-Extra: gemini
Requires-Dist: google-generativeai>=0.5; extra == 'gemini'
Provides-Extra: ollama
Requires-Dist: httpx>=0.27; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: openai>=1.0; extra == 'openai'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.20; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'otel'
Provides-Extra: redis
Requires-Dist: redis>=5.0; extra == 'redis'
Provides-Extra: s3
Requires-Dist: boto3>=1.28; extra == 's3'
Description-Content-Type: text/markdown

<p align="center">
  <h1 align="center">forge</h1>
  <p align="center">The developer runtime for AI-era Python.</p>
  <p align="center">
    <a href="https://pypi.org/project/forge-kaif"><img src="https://img.shields.io/pypi/v/forge-kaif" alt="PyPI"></a>
    <a href="https://pypi.org/project/forge-kaif"><img src="https://img.shields.io/pypi/pyversions/forge-kaif" alt="Python versions"></a>
    <a href="https://github.com/kaif-ai-engineer/forge-kaif/actions"><img src="https://img.shields.io/github/actions/workflow/status/kaif-ai-engineer/forge-kaif/test.yml?branch=main" alt="CI"></a>
    <a href="LICENSE"><img src="https://img.shields.io/github/license/kaif-ai-engineer/forge-kaif" alt="MIT"></a>
  </p>
</p>

---

forge is a modular Python runtime that eliminates the undifferentiated heavy lifting
of backend development — config, logging, retries, AI model integration, health checks,
caching, and more.

```python
from forge.ai import complete, Message

response = await complete(
    messages=[Message.user("What is 2+2?")],
    model="gpt-4o",
)
print(response.content)
```

## Features

forge is **not** a web framework. It is the infrastructure layer that sits **below**
your web framework — the reusable runtime that every Python backend service needs.

- **Config** — typed, validated, layered configuration from env vars, `.env`, and TOML
- **Logging** — structured JSON logging with automatic trace context propagation
- **Retry** — exponential backoff, jitter, circuit breaker, and timeout management
- **AI** — unified interface across OpenAI, Anthropic, Gemini, and Ollama
- **Health** — Kubernetes-compatible `/health` and `/ready` endpoints
- **Cache** — decorator-based caching with in-memory and Redis backends
- **Validation** — Pydantic-integrated input validation with consistent error responses
- **CLI** — `forge init`, `forge check config`, `forge add module`

## Installation

```bash
pip install forge-kaif
```

With optional extras:

```bash
pip install "forge-kaif[openai]"       # OpenAI provider
pip install "forge-kaif[all]"           # all optional providers
pip install "forge-kaif[dev]"           # development tooling
```

## Quick Start

```python
import asyncio
from forge.ai import complete, Message

async def main():
    response = await complete(
        messages=[Message.user("Hello, world")],
    )
    print(response.content)

asyncio.run(main())
```

## Documentation

Full documentation is available at [ForgeKaif](https://kaif-ai-engineer.github.io/forge-kaif/).

## Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.

## License

MIT — see [LICENSE](LICENSE) for details.
