Skip to main content

Pctx0 Client

Python Client for the Actx0 Platform.

Install

uv add pctx0

For document chunking helpers:

uv add "pctx0[chunk]"

Usage

from pctx0 import knowledge

client = knowledge(
    access_key="your-access-key",
    workspace_id="your-workspace-id",
)
client.list()
client.close()

Or use the full client when you need multiple API areas:

from pctx0 import Pctx0Client

client = Pctx0Client(
    access_key="your-access-key",
    workspace_id="your-workspace-id",
)
client.health()
client.knowledge.list()
client.close()

Chunking

Requires pctx0[chunk]. Split long docs before upload with Actx0 defaults (recursive, size 2000, overlap 400):

from pctx0 import chunk, chunk_text

chunks = chunk_text(long_document)
# or: chunks = chunk("notes.md")

for part in chunks:
    client.knowledge.upload(
        file=part.as_file(filename=f"notes-{part.index:04d}.txt"),
        title=f"Notes part {part.index + 1}",
    )

Development

uv sync
uv format --check --preview-features format
uv run pytest

Tests start a local mock API server automatically. To run against your own local pctx0 server:

PCTX0_BASE_URL=http://127.0.0.1:8000 uv run pytest

Metadata

Release files for pctx0 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pctx0 0.1.2
File Size Uploaded
pctx0-0.1.2.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pctx0 0.1.2
File Interpreter ABI Platform
pctx0-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 35.6 kB

Release files / pctx0-0.1.2.tar.gz

Download URL pctx0-0.1.2.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
935cc28fdbfa2ec2abc02b5ae8225eb147444973d80572375eca9ff9e97fda61
BLAKE2b-256 checksum
How to use checksums
4446c8868257a1d31d6e67ee78160d86971c7fdc9667fb07c61b3913e9265b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pctx0-0.1.2-py3-none-any.whl

Download URL pctx0-0.1.2-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c45779a693817a18b09e4e9a6404b76a25373d48eff44f3e42eea2cf82d1225
BLAKE2b-256 checksum
How to use checksums
f6ecf8ec524766b30efa407238725658d346a6ab29368129a1ff2716826c0e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release 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