Metadata-Version: 2.4
Name: ai4icore-core
Version: 1.1.4
Summary: AI4ICore Core - consolidated utility libraries (exceptions, logging, telemetry, observability, bootstrap, email) for AI4ICore microservices
Author-email: AI4I Team <bharathi.alwar@tarento.com>
License: MIT
Project-URL: Homepage, https://github.com/COSS-India/ai4i-core
Project-URL: Repository, https://github.com/COSS-India/ai4i-core
Project-URL: Issues, https://github.com/COSS-India/ai4i-core/issues
Project-URL: Source, https://github.com/COSS-India/ai4i-core/tree/master/libs/ai4icore_core
Keywords: ai4icore,fastapi,logging,telemetry,observability,bootstrap,email,exceptions
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: FastAPI
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.104.0
Requires-Dist: starlette>=0.27.0
Requires-Dist: pydantic>=2.5.0
Requires-Dist: pydantic-settings>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: redis>=5.0.0
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
Requires-Dist: slowapi>=0.1.9
Requires-Dist: aiosmtplib<4.0.0,>=3.0.0
Requires-Dist: jinja2<4.0.0,>=3.1.0
Requires-Dist: python-json-logger>=2.0.7
Requires-Dist: kafka-python>=2.0.2
Requires-Dist: aiokafka>=0.8.0
Requires-Dist: prometheus-client>=0.19.0
Requires-Dist: psutil>=5.9.0
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: tritonclient[http]>=2.40.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: packaging>=21.0
Requires-Dist: opentelemetry-api>=1.20.0
Requires-Dist: opentelemetry-sdk>=1.20.0
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.41b0
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.20.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: license-file

# ai4icore-core

Consolidated utility libraries for AI4ICore microservices. A single installable package that bundles what used to live across ten standalone libraries — constants, env, exceptions, logging, telemetry, observability, model management, service base, bootstrap, and email.

## Installation

```bash
pip install ai4icore-core
```

## Subpackages

| Subpackage | Purpose |
| --- | --- |
| `ai4icore_core.bootstrap` | FastAPI app bootstrap helpers (cache, database, redis, schemas, versioning) |
| `ai4icore_core.constants` | Static error codes, messages, and back-compat re-exports |
| `ai4icore_core.email` | Provider-agnostic transactional email client (SMTP, console, pluggable) |
| `ai4icore_core.env` | Pydantic-based environment / settings |
| `ai4icore_core.exceptions` | Shared exception hierarchy, response envelope, FastAPI handlers |
| `ai4icore_core.logging` | Structured JSON logging with trace correlation |
| `ai4icore_core.model_management` | Model management client, Triton inference, FastAPI middleware |
| `ai4icore_core.observability` | Prometheus metrics, dashboards, middleware |
| `ai4icore_core.service_base` | App factory, health, rate limit, service registry, inference headers |
| `ai4icore_core.telemetry` | OpenTelemetry tracing, Jaeger / OpenSearch query clients |

## Usage

```python
from ai4icore_core.env import app_env
from ai4icore_core.logging import get_logger, register_logging_plugin
from ai4icore_core.exceptions import register_exception_handlers
from ai4icore_core.observability import ObservabilityPlugin, PluginConfig
from ai4icore_core.telemetry import register_telemetry_plugin, TelemetryConfig
from ai4icore_core.service_base import create_inference_app
```

See each subpackage's source for the full surface.

## Requirements

- Python `>= 3.11`

## License

MIT — see [LICENSE](LICENSE).

## Links

- Source: <https://github.com/COSS-India/ai4i-core>
- Issues: <https://github.com/COSS-India/ai4i-core/issues>
