A Python client for Plain GraphQL API
Project description
Plain Client
A Python client for Plain GraphQL API
Documentation: https://frankie567.github.io/plain-client/
Source Code: https://github.com/frankie567/plain-client
[!IMPORTANT] This client is generated automatically using:
- ariadne-codegen
- Plain GraphQL Schema
- Fragments, mutations and queries provided by Plain in their official TypeScript SDK
Quickstart
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
We use Hatch to manage the development environment and production build. Ensure it's installed on your system.
Generate the client
You can trigger a generation of the client with:
hatch run generate
It'll automatically download latest schema, fragments, mutations and queries provided by Plain.
Run unit tests
You can run all the tests with:
hatch run test:test
Publish a new version
You can bump the version, create a commit and associated tag with one command:
hatch version patch
hatch version minor
hatch version major
Your default Git text editor will open so you can add information about the release.
When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.
Serve the documentation
You can serve the Mkdocs documentation with:
hatch run docs-serve
It'll automatically watch for changes in your code.
License
This project is licensed under the terms of the MIT license.
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 plain_client-0.0.3.tar.gz.
File metadata
- Download URL: plain_client-0.0.3.tar.gz
- Upload date:
- Size: 47.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b6a90aa6ed8ed8d5d4b74cc6b030fce744281f39e98d4a5087421f977238fcc
|
|
| MD5 |
3339e7194682f0c73c494f6bacb06031
|
|
| BLAKE2b-256 |
176da4c992c3d9ee9606112fd3dda17318358e05882b14986817ac8b81f7ac49
|
File details
Details for the file plain_client-0.0.3-py3-none-any.whl.
File metadata
- Download URL: plain_client-0.0.3-py3-none-any.whl
- Upload date:
- Size: 67.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9377119ae75003120c054269f2f36197d906b42a66ecf3a753de4b406c815f2c
|
|
| MD5 |
03e6bdd518f1c0a54a27e269fd0c1469
|
|
| BLAKE2b-256 |
157815fa2a778c1ce868701d0b8c164a00c9e122db76745f299458840f425746
|