Metadata-Version: 2.4
Name: mic-platform
Version: 0.1.0
Summary: MIC — policy & contrôle (authz OPA/OpenFGA, ratelimit).
License-Expression: MIT
Requires-Python: >=3.14
Requires-Dist: mic-core
Requires-Dist: mic-datastore
Provides-Extra: opa
Requires-Dist: mic-core[client]; extra == 'opa'
Provides-Extra: openfga
Requires-Dist: mic-core[client]; extra == 'openfga'
Provides-Extra: redis
Requires-Dist: mic-datastore[redis]; extra == 'redis'
Description-Content-Type: text/markdown

# mic-platform

Briques **policy & contrôle** du framework MIC. Sommet du DAG
`platform → data → core` : dépend de `mic-core` ET `mic-datastore`.

## Modules

| Module | Rôle |
| -- | -- |
| `mic.authz` | Autorisation : moteur in-memory, OPA, OpenFGA (appels API **via httpx**) |
| `mic.ratelimit` | Rate limiting (in-memory / Redis Lua) + `RateLimitMiddleware` |

Namespace **PEP 420** (pas de `mic/__init__.py`).

## Installation

```bash
pip install "mic-platform[openfga,redis]"
```

## Extras

| Extra | Tire |
| -- | -- |
| `opa` | `mic-core[client]` (httpx — appels HTTP vers l'agent OPA) |
| `openfga` | `mic-core[client]` (httpx — API OpenFGA ; **pas** le SDK officiel) |
| `redis` | `mic-datastore[redis]` (backend Lua du rate limiter) |

> ℹ️ L'adaptateur OpenFGA (`mic.authz.openfga`) parle à l'API HTTP via `httpx`,
> il n'utilise **pas** `openfga-sdk`.

## Versionnage

Brique volatile (OPA/OpenFGA bougent vite) — reste en `0.x`. Contraindre avec
`>=0.1,<1`. Release : `make release-pkg PKG=platform VERSION=x.y.z` → tag
`platform-vX.Y.Z` (cf. [`../../RELEASING.md`](../../RELEASING.md)).
