Skip to main content

WACP Python SDK (wacp)

Version: 2.0.0

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.0 — 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.1.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.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wacp-2.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 79564875fe27755ea3faecfbbdf9efc5e47a534a38aebbca54481230577bb2e7
MD5 4174fa6929786bf7c787533d01cd69e5
BLAKE2b-256 3c21e539354a8e4d41813e8d02d61cc63bd3a3d85fa4164a6800a29e5ffa281b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wacp-2.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eea9f0fd4e58449fea58ce19dd4e713e9ffe71bdb365956a8037578be6520dd
MD5 cad9692b5c5fd1d4781c0f50d3015b63
BLAKE2b-256 cb15081777cf7e2e779f1009af3166dbb13f9315d2a92d22e59261c6022664a3

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