Skip to main content

WACP Python SDK (wacp)

Version: 2.0.2

pip install wacp

One package for Python. Framework adapters live in submodules:

from wacp.fastapi import wacp_router
# later: from wacp.flask import ...
# later: from wacp.django import ...

Full changelog: CHANGELOG.md


Quick start (FastAPI)

from fastapi import FastAPI
from wacp.fastapi import wacp_router

app = FastAPI()

# ... your normal routes ...

app.include_router(
    wacp_router(
        app,
        base_dir="ai",       # folder with config/ + docs/
        discover=True,       # optional: write config/_discovered.json
    )
)

If ai/config/ does not exist, the SDK auto-scaffolds starter JSON files on first boot.


Package layout

wacp/
  core/          # config, scaffold, search, types (shared)
  fastapi/       # FastAPI adapter (wacp_router, discovery)
  # flask/       # planned
  # django/      # planned

base_dir layout

ai/
  config/
    main.json
    categories.json
    endpoints.json
    docs.json
    custom-map.json
    _discovered.json        # only when discover=True (never served / never merged)
  docs/
    overview.md

Optional: set files.search_vocabulary in main.json to a JSON file under config/ for org-specific synonym overrides.


Routes

Method Path Purpose
GET /ai Entry: app info, navigation, quick access
GET /ai/all Flat list of endpoints (?page=&limit= optional)
GET /ai/category Category index
GET /ai/category/{id} Endpoints in a category
GET /ai/endpoint/{id} Full endpoint detail
GET /ai/docs Docs index
GET /ai/docs/{filename} Raw doc content
GET /ai/search?q= Lexical search

Discovery (discover=True)

from wacp.fastapi import wacp_router, FastAPIDiscovery
  • Writes base_dir/config/_discovered.json
  • Never served by /ai, never merged into endpoints.json
  • Scaffold runs before discovery on a fresh base_dir

Search & pagination

Lightweight lexical search via GET /ai/search?q=....
List routes accept optional ?page=&limit=.


Versioning

2.0.2 — see CHANGELOG and wacp.__version__.


License

MIT

Download files

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

Source Distribution

wacp-2.0.2.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

wacp-2.0.2-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file wacp-2.0.2.tar.gz.

File metadata

  • Download URL: wacp-2.0.2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for wacp-2.0.2.tar.gz
Algorithm Hash digest
SHA256 7147efdd67aaad8e1dcdd39d1b577d96c4ba2b72606e791ea8f109e607317786
MD5 989bc04b600c293b2c5a9ba3f4eb5d34
BLAKE2b-256 ae24b45704fbde18d2fcb9093626fb15bc57e9fec4026152705e1e1565cb7d46

See more details on using hashes here.

File details

Details for the file wacp-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: wacp-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for wacp-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5cdfccf1d55795f1cbe4ebb1d013a5d3a4732fc40f1aa178e7646a49208c7c06
MD5 70bb6a93875f5e8a2505319ec33484aa
BLAKE2b-256 b002a97e699bb6ee76db92ce1c5f9f7e973527780fa4b7a28274febb07afdb7c

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 Sentry Error logging StatusPage Status page