Entity-to-Web-API conversion library: Python framework that turns internal configuration, service functions, and entities into production-ready APIs using FastAPI, with minimal boilerplate
Project description
xwapi
Engine-agnostic API framework for the eXonware stack. xwapi exposes xwentity and xwaction as HTTP endpoints, standardizes error contracts, supports production middleware, and now includes a durable action pipeline plus API token lifecycle/metering.
Longer guide: README_LONG.md.
Company: eXonware.com · Author: eXonware Backend Team · Email: connect@exonware.com
Install
| Install | When to use |
|---|---|
pip install exonware-xwapi |
Core runtime |
pip install exonware-xwapi[lazy] |
Lazy dependency loading |
pip install exonware-xwapi[full] |
Full production dependency set |
Quick start
from exonware.xwapi import XWAPI
from exonware.xwentity import XWEntity
class User(XWEntity):
name: str
email: str
age: int
api = XWAPI(entities=[User], title="My API", version="1.0.0")
app = api.create_app(engine="fastapi")
New production features
- Engine-agnostic error contract:
xwapi_error_to_http_partsplus adapters keepsXWAPIErrortransport-neutral. - Outbox + singleton worker pipeline:
ActionPipelineManager,AOutboxStore/InMemoryOutboxStore, andBackgroundWorker. - API token lifecycle: create/list/revoke tokens, usage tracking, balance/recharge, idempotent metering.
- Provider abstractions:
IAuthProvider,IStorageProvider,IPaymentProviderwith in-memory and library adapters. - API token middleware: bearer verification, optional scope enforcement, deny-unmapped policy, usage metering via
Idempotency-Key. - Admin/operations endpoints: server status/health/pipeline controls and token admin endpoints.
- Production guardrails: environment-based admin token enforcement and admin read-protection support.
eXonware integration
xwapi now explicitly integrates with:
xwsystem(serialization, logging/utilities)xwaction(action registration and execution)xwentity(entity-driven API surfaces)xwschema(schema validation/generation integration points)xwdata(data/serialization integration paths)
Docs and tests
- Start at docs/INDEX.md.
- API and architecture references: docs/REF_15_API.md, docs/REF_13_ARCH.md.
- Test layers:
0.core,1.unit,2.integration,3.advance. - Full run:
python tests/runner.py
Async support
- Core runtime includes async methods across facade, token manager, middleware paths, and server actions.
- Async APIs are recommended for I/O-heavy and concurrent workloads.
MIT - see LICENSE. Homepage: https://exonware.com Version: 0.9.0.3 | Updated: 01-Apr-2026
Built with ❤️ by eXonware.com - Revolutionizing Python Development Since 2025
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exonware_xwapi-0.9.0.3.tar.gz.
File metadata
- Download URL: exonware_xwapi-0.9.0.3.tar.gz
- Upload date:
- Size: 161.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4669f0eab4c22116d359729fc78a0d10e8cc1fae3b535f42ed32f5e0a48d82fb
|
|
| MD5 |
e9d09d09632ed1f729fc8a10c1bb56b0
|
|
| BLAKE2b-256 |
a2f29d65a698c17783a3083e5a7d2f8d440f5a8cf3b601ab3288566ea2012f6e
|
File details
Details for the file exonware_xwapi-0.9.0.3-py3-none-any.whl.
File metadata
- Download URL: exonware_xwapi-0.9.0.3-py3-none-any.whl
- Upload date:
- Size: 142.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7269802cfca98876ed00b0b2b405e59468df0032b892d90f6fbe50080cf06ef8
|
|
| MD5 |
857a4469025f1fcfeb087d88a037e3e0
|
|
| BLAKE2b-256 |
b34fe49b811c249182691c536c9d7615f25f98b497cc80e1832974afbe971b26
|