Python client for the Poe API (api.poe.com)
Project description
poe
Official Python client for the Poe chat completions API.
Installation
pip install poe
Quick Start
from poe import PoeClient
client = PoeClient(api_key="your-poe-api-key")
# Simple chat
response = client.chat("What is Python?", model="GPT-4o")
print(response["choices"][0]["message"]["content"])
Streaming
for chunk in client.stream("Tell me a story", model="GPT-4o"):
print(chunk, end="", flush=True)
Options
client = PoeClient(
api_key="your-key",
timeout=120.0, # request timeout in seconds
)
response = client.chat(
"Explain quantum computing",
model="GPT-4o",
temperature=0.7,
max_tokens=1024,
system_prompt="You are a helpful physics teacher.",
)
Context Manager
with PoeClient(api_key="your-key") as client:
resp = client.chat("Hello!")
print(resp["choices"][0]["message"]["content"])
API Key
Get your API key from poe.com/api_key.
License
MIT
Project details
Release history Release notifications | RSS feed
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 poe-0.1.0.tar.gz.
File metadata
- Download URL: poe-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f293cd30de517b89daa82c0537bc5015d48871f0fcfe720f5eaa01aab4a03299
|
|
| MD5 |
c4ce3c7a7822074396e95bee4eee8e83
|
|
| BLAKE2b-256 |
622323e42436a734412d8e46ecdc05041a5533619ce6b3bcb05977c34d9e61f3
|
Provenance
The following attestation bundles were made for poe-0.1.0.tar.gz:
Publisher:
pypi.yml on poe-platform/poe-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
poe-0.1.0.tar.gz -
Subject digest:
f293cd30de517b89daa82c0537bc5015d48871f0fcfe720f5eaa01aab4a03299 - Sigstore transparency entry: 1200337190
- Sigstore integration time:
-
Permalink:
poe-platform/poe-python@a5301db037f7a16509522dd066d352a0b62e6bc9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/poe-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a5301db037f7a16509522dd066d352a0b62e6bc9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file poe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: poe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b71291c874befd2d8607cff13cbbc9c847016781742e57c3ab6729bd777f65
|
|
| MD5 |
22461c2a697f994d8db2efcc53d42c0e
|
|
| BLAKE2b-256 |
20820736aa02fb146c1e7f742467ce58df2348bcb43cb2da9e17081bc5cf5cfc
|
Provenance
The following attestation bundles were made for poe-0.1.0-py3-none-any.whl:
Publisher:
pypi.yml on poe-platform/poe-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
poe-0.1.0-py3-none-any.whl -
Subject digest:
93b71291c874befd2d8607cff13cbbc9c847016781742e57c3ab6729bd777f65 - Sigstore transparency entry: 1200337223
- Sigstore integration time:
-
Permalink:
poe-platform/poe-python@a5301db037f7a16509522dd066d352a0b62e6bc9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/poe-platform
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@a5301db037f7a16509522dd066d352a0b62e6bc9 -
Trigger Event:
release
-
Statement type: