fastapi_poe
An implementation of the Poe protocol using FastAPI.
Installation
Install the package from PyPI:
pip install fastapi-poe
Write your own bot
This package can also be used as a base to write your own bot. You can inherit from
PoeBot to make a bot:
import fastapi_poe as fp
class EchoBot(fp.PoeBot):
async def get_response(self, request: fp.QueryRequest):
last_message = request.query[-1].content
yield fp.PartialResponse(text=last_message)
if __name__ == "__main__":
fp.run(EchoBot(), allow_without_key=True)
Now, run your bot using python <filename.py>.
- In a different terminal, run ngrok to make it publicly accessible.
- Use the publicly accessible url to integrate your bot with Poe
Enable authentication
Poe servers send requests containing Authorization HTTP header in the format "Bearer <access_key>"; the access key is configured in the bot settings page.
To validate that the request is from the Poe servers, you can either set the environment variable POE_ACCESS_KEY or pass the parameter access_key in the run function like:
if __name__ == "__main__":
fp.run(EchoBot(), access_key=<key>)
Samples
Check out our starter code repository for some examples you can use to get started with bot development.
Metadata
Release files for fastapi-poe 0.0.83
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_poe-0.0.83.tar.gz | 52.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_poe-0.0.83-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.2 kB
Release files / fastapi_poe-0.0.83.tar.gz
| Download URL | fastapi_poe-0.0.83.tar.gz |
|---|---|
| Size | 52.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39c3c1a3fab444d5a0357b1adc80512485e939ea9ff9f907c179fa484315a2c5
|
|
BLAKE2b-256 checksum How to use checksums |
54d36b8bfb88613c333a5b8f9c84645dea91dda09d3ad7780490df12ed6e1cfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency logRelease files / fastapi_poe-0.0.83-py3-none-any.whl
| Download URL | fastapi_poe-0.0.83-py3-none-any.whl |
|---|---|
| Size | 34.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff0dcb6bed43671ff387c60c01a3a7cc9d21ef6e8d10762e9cdce1e04e79a4d2
|
|
BLAKE2b-256 checksum How to use checksums |
7860e2c3a6da3bc15a3fd3e8fc3a7743156531ecc0c4ccb1b0824c6bd6fb258f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency log