Skip to main content

pagekit

Python client for the Pagekit content API.

Installation

pip install pagekit-core

Quick start

from pagekit import Pagekit

client = Pagekit(api_key="pk_live_...")

# List posts
page = client.posts.list(status="published", limit=10)
for post in page.data:
    print(post.title)

# Create a post
post = client.posts.create(title="Hello world", content="<p>First post</p>")

# Get by slug
post = client.posts.get_by_slug("hello-world")

Async usage

from pagekit import AsyncPagekit

client = AsyncPagekit(api_key="pk_live_...")

posts = await client.posts.list()

Configuration

client = Pagekit(
    api_key="pk_live_...",
    base_url="https://api.pagekit.app/v1",  # default
    timeout=30,                               # seconds
    headers={"X-Custom": "value"},            # extra headers
)

Error handling

from pagekit import Pagekit, PagekitError

client = Pagekit(api_key="pk_live_...")

try:
    post = client.posts.get("nonexistent")
except PagekitError as e:
    print(e.status)   # 404
    print(e.code)     # "not_found"
    print(e.is_auth_error)      # False
    print(e.is_rate_limited)    # False
    print(e.is_server_error)    # False

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

pagekit_core-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pagekit_core-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file pagekit_core-0.1.0.tar.gz.

File metadata

  • Download URL: pagekit_core-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pagekit_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff2a511a3b2c3e8abdcbd031ac4f1f1d995e6b92a14d969282b2c7e11fc9be3e
MD5 984e3dd0895209bc3e66ef2e773fa721
BLAKE2b-256 387c2c9b8e9ec2fcd03313265ffae5a57d9faf3bd23ab9220a103d0201c3e671

See more details on using hashes here.

File details

Details for the file pagekit_core-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pagekit_core-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pagekit_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f19ca98cd918751174aba74204dd9f10858ab61b07f1800d2b936907ab0f9f0
MD5 98bb16b8b4b1b57ab5a44300b0556c25
BLAKE2b-256 554c120f98e4860b56fe5b2baf20d8f926c8f1face0704329ede1fcf8fa4d34e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page