Skip to main content

Convenience wrapper for exonware-xwapi - provides 'import xwapi' alias

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

Status Python License


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_parts plus adapters keeps XWAPIError transport-neutral.
  • Outbox + singleton worker pipeline: ActionPipelineManager, AOutboxStore/InMemoryOutboxStore, and BackgroundWorker.
  • API token lifecycle: create/list/revoke tokens, usage tracking, balance/recharge, idempotent metering.
  • Provider abstractions: IAuthProvider, IStorageProvider, IPaymentProvider with 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


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.2 | Updated: 01-Apr-2026

Built with ❤️ by eXonware.com - Revolutionizing Python Development Since 2025

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xwapi-0.9.0.2.tar.gz (160.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xwapi-0.9.0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file xwapi-0.9.0.2.tar.gz.

File metadata

  • Download URL: xwapi-0.9.0.2.tar.gz
  • Upload date:
  • Size: 160.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for xwapi-0.9.0.2.tar.gz
Algorithm Hash digest
SHA256 fbe67e49584ea8de7ff4341df0f8b5cbf18b33b00a29cd4ac763e604c5f4df8d
MD5 d0b85eca2f1e6bd92a13e619051f7186
BLAKE2b-256 c8053b6f82effd6d61c474dfa6ab4399a53533074c2d09736267d2470542f501

See more details on using hashes here.

File details

Details for the file xwapi-0.9.0.2-py3-none-any.whl.

File metadata

  • Download URL: xwapi-0.9.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for xwapi-0.9.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ff905bd36cca871ef7b72ecd24cca8e905621572a96d85986e8e45228ae15f2e
MD5 c72e2cbcc1475d3f6c311546603b27d7
BLAKE2b-256 25b98a455c610bdc252a47be0379a52a62c7f4d73a5498ac90be883ffed12c6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page