Catalog PyPI
PACKAGE EXPLORERView in registry

ai4i-core

PyPI

AI4I Core - consolidated utility libraries (exceptions, logging, telemetry, observability, bootstrap, email) for AI4I microservices

ai4ibootstrapemailexceptionsfastapiloggingobservabilitytelemetry
Versions collected1
Direct dependencies31From release 1.0.52
Last observed21 Oct, 09:48 UTC

README

Version 1.0.52 documentation

ai4i-core

Consolidated utility libraries for AI4I microservices — a single installable package providing the cross-cutting concerns (FastAPI bootstrap helpers, logging, observability, telemetry, exceptions, and email) shared across the AI4I backend services.

Installation

pip install ai4i-core

Subpackages

SubpackagePurpose
ai4i_core.bootstrapFastAPI app-factory helpers: cache, database, Redis, health router, rate limiting, schemas, API versioning
ai4i_core.contextShared contextvars (trace id, tenant id, user id, endpoint path) read by the logging and telemetry layers
ai4i_core.emailProvider-agnostic transactional email client (SMTP, console; pluggable providers)
ai4i_core.exceptionsShared exception hierarchy, response envelope, and FastAPI exception handlers
ai4i_core.loggingStructured JSON logging with trace/tenant correlation and request middleware
ai4i_core.observabilityPrometheus metrics collection and ASGI middleware
ai4i_core.telemetryOpenTelemetry tracing, W3C context propagation, OpenSearch query clients

Usage

from ai4i_core.bootstrap import create_service_app, init_database, init_redis
from ai4i_core.logging import get_logger, RequestMiddleware
from ai4i_core.exceptions import AppError, InsufficientPermissionsError
from ai4i_core.observability import setup_observability, ObservabilityMiddleware
from ai4i_core.telemetry import TraceManager, trace_stage
from ai4i_core.email import EmailClient, EmailMessage
from ai4i_core.context import get_trace_id, get_tenant_id

Each subpackage's __init__.py (__all__) lists its full public surface.

Requirements

  • Python >= 3.11

License

MIT — see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.5214 Oct 202631

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
coss-india/ai4i-core

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:48 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:11fff57692bc6ab814d12a3e790ba6b7b4e47ae9ddd007e4c404763ae39b4246