Authentication
The Poli Page Python SDK authenticates every request with a bearer token. The key prefix determines which environment the request hits.
API keys
Section titled “API keys”Pass the key to the client constructor, or let the SDK pick it up from POLI_PAGE_API_KEY:
import osfrom poli_page import PoliPage
# Explicit:client = PoliPage(api_key=os.environ["POLI_PAGE_API_KEY"])
# Implicit — same env var, fewer characters:client = PoliPage()If no key is provided either way, the constructor raises PoliPageError(code="invalid_options").
Example
Section titled “Example”import osfrom poli_page import PoliPage
client = PoliPage(api_key=os.environ["POLI_PAGE_API_KEY"])