Registry / devops / fastapi-poe

fastapi-poe

JSON →
library0.0.83pypypi✓ verified 85d ago

A demonstration of the Poe protocol using FastAPI. Version 0.0.83, active development, roughly weekly releases.

pip install fastapi-poe
INSTALL
IMPORT
SIG · FASTAPI-POE
F
fastapi-poe
devopspythonv0.0.83
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

make_app
from fastapi_poe import make_app
PoeBot
from fastapi_poe import PoeBot
run
from fastapi_poe import run

Minimal bot that echoes user messages using FastAPI and Poe protocol.

from fastapi_poe import make_app, PoeBot from fastapi_poe.client import stream_request import os # Define a simple echo bot class EchoBot(PoeBot): async def get_response(self, request): async for msg in stream_request(request): yield msg app = make_app(EchoBot(), access_key=os.environ.get('POE_ACCESS_KEY', '')) if __name__ == '__main__': import uvicorn uvicorn.run(app, host='0.0.0.0', port=8080)
Debug
Known issues
breakingThe access_key parameter in make_app is required for production; without it, the app will reject all requests.
fix
Set POE_ACCESS_KEY environment variable or pass access_key to make_app.
affects: all
gotchaThe bot must be run with an ASGI server like uvicorn, not directly with python script.py (no __main__ entry).
fix
Use command line: uvicorn my_bot:app --host 0.0.0.0 --port 8080
affects: all
deprecatedThe old import `from fastapi_poe.client import stream_request` is being replaced; use `from poe_api import stream_request` in future versions.
fix
Update imports to poe_api or use the new fastapi_poe.client module.
affects: <=0.0.80
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fastapi_poe'
fastapi-poe not installed
fix
Run `pip install fastapi-poe`
AttributeError: module 'fastapi_poe' has no attribute 'make_app'
Wrong import or older version
fix
Update to latest: `pip install --upgrade fastapi-poe` and use `from fastapi_poe import make_app`
RuntimeError: No access key provided
Missing POE_ACCESS_KEY environment variable
fix
Set POE_ACCESS_KEY=<your_key> or pass access_key to make_app()
Upgrade
Version history
0.0.83latest on PyPI · released Jan 22, 2026
Audit
Dependencies
fastapirequiredFastAPI is the web framework used
poe-apirequiredPoe API types and helpers
uvicornoptionalASGI server for running the app
Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

fastapi-poe — pip install fastapi-poe · libregistry