WACP Python SDK (wacp)
Version: 2.0.3
pip install wacp
One package, all frameworks. Same function name everywhere:
from wacp.fastapi import wacp_router # FastAPI
from wacp.flask import wacp_router # Flask
from wacp.django import wacp_router # Django
Only pydantic is installed as a dependency. Your framework (fastapi/flask/django) must already be in your environment.
Quick start — FastAPI
from fastapi import FastAPI
from wacp.fastapi import wacp_router
app = FastAPI()
app.include_router(
wacp_router(
app,
base_dir="ai",
discover=True,
)
)
Quick start — Flask
from flask import Flask
from wacp.flask import wacp_router
app = Flask(__name__)
app.register_blueprint(
wacp_router(
app,
base_dir="ai",
discover=True,
)
)
Quick start — Django
# urls.py
from wacp.django import wacp_router
urlpatterns = [
# ... your routes ...
] + wacp_router(base_dir="ai", discover=True, urlconf="myproject.urls")
If ai/config/ does not exist, the SDK auto-scaffolds starter JSON files + a setup guide on first boot.
Package layout
wacp/
core/ # config, scaffold, search, types (shared across all frameworks)
fastapi/ # FastAPI adapter (wacp_router, FastAPIDiscovery)
flask/ # Flask adapter (wacp_router, FlaskDiscovery)
django/ # Django adapter (wacp_router, DjangoDiscovery)
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
Each adapter supports discover=True which scans your app's routes and writes config/_discovered.json:
- FastAPI:
wacp_router(app, discover=True) - Flask:
wacp_router(app, discover=True) - Django:
wacp_router(discover=True, urlconf="myproject.urls")
The file is never served and never merged — copy blocks into your endpoints.json.
Search & pagination
Lightweight lexical search via GET /ai/search?q=....
List routes accept optional ?page=&limit=.
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
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 wacp-2.0.3.tar.gz.
File metadata
- Download URL: wacp-2.0.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f59ff1709c3638f3fe8419a7a6092be674456d5635cf3925df518606aa89b25
|
|
| MD5 |
26fedc883ff4d880156014e59a2d6c87
|
|
| BLAKE2b-256 |
4b1748354667df8d2ab3cff9499fc89c80ec3b4de2a000af50327dbc2d64e52a
|
File details
Details for the file wacp-2.0.3-py3-none-any.whl.
File metadata
- Download URL: wacp-2.0.3-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03cad9cb51b29c39d7a94259f5ef916383c1fab9fb58523316abf9320fa83406
|
|
| MD5 |
b686e1bbc7ac5f297d03fe4700e7dc43
|
|
| BLAKE2b-256 |
b7edc56c81b9dab20929e6b8bfefa71743f762bd5d283e0968e42810a9256bf6
|