Plain Client
A Python client for Plain GraphQL API
Documentation: https://frankie567.github.io/plain-client/
Source Code: https://github.com/frankie567/plain-client
Quickstart
Requires Python 3.11 or newer. The client uses HTTPX2; pass an
httpx2.AsyncClient when supplying a custom HTTP client.
pip install plain-client
from plain_client import Plain
client = Plain(
"https://core-api.uk.plain.com/graphql/v1", {"Authorization": "Bearer YOUR_API_KEY"}
)
async def get_thread():
return await client.thread("THREAD_ID")
Development
Setup environment
Install uv and just. Use Python 3.11 or newer.
Install the development dependencies and pre-commit hooks with just install.
Generate the client
Run just generate to download the schema, fragments, mutations, and queries
from Plain's TypeScript SDK and regenerate the client.
Use just generate-local to regenerate from the existing downloads.
Generation requires curl.
Run unit tests
just test
Format the code
Run Ruff to format and lint the code, then check types with ty.
just lint
Use just lint-check to run the same checks without editing files.
Publishing a release
- Commit the release notes under
Unreleasedin CHANGELOG.md. From a clean release branch with Git signing configured, runjust version patch,just version minor, orjust version major. The recipe updates the version, changelog, and lockfile, then opens your Git editor for the signed commit. - Preview the release notes with
just release-notes <version>, then push the branch and merge the release PR intomain. - With the GitHub CLI authenticated, run
just release <PR number>. This signs and pushes a tag pointing to the merged PR commit. After the checks pass, CI publishes the distributions to PyPI with attestations and publishes the GitHub release with build provenance.
The PyPI Trusted Publisher must match the build.yml workflow and the GitHub
release environment.
Serve the documentation
The documentation uses Zensical. Start the local preview with the following command.
just docs-serve
Open http://localhost:8000. The preview reloads when documentation changes.
Edit pages in docs/ and configure the site in zensical.toml.
Build the static site into site/ with the following command.
just docs-build
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for plain-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plain_client-0.1.0.tar.gz | 620.5 kB | With provenance | Details for plain_client-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plain_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for plain_client-0.1.0-py3-none-any.whl |
Total release size: 1.4 MB
Release files / plain_client-0.1.0.tar.gz
| Download URL | plain_client-0.1.0.tar.gz |
|---|---|
| Size | 620.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a379c74542472164b8d35bc8f572647005ac79f8e946c497462a7d040fefb588
|
|
BLAKE2b-256 checksum How to use checksums |
d5136054acba403a83a5021e155f3ae3154a81a3fd7055d1114bf1798d60c9d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logRelease files / plain_client-0.1.0-py3-none-any.whl
| Download URL | plain_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 803.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5cb2e63e48f579b00bf7ffde4d8e669345dfae84260eaf04e2ef5057cd28bfc
|
|
BLAKE2b-256 checksum How to use checksums |
e43709b141cd205f6136f3844ac7e208df0d575a5747282f19c2b1adcf0e51e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 16, 2026.
Transparency logSecurity for plain-client 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for plain_client-0.1.0.tar.gz
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 Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.