Skip to main content
PyCon US is happening May 14th-22nd in Pittsburgh, PA USA.  Learn more

A Python client for Plain GraphQL API

Project description

Plain Client

A Python client for Plain GraphQL API

build PyPI version


Documentation: https://frankie567.github.io/plain-client/

Source Code: https://github.com/frankie567/plain-client


[!IMPORTANT] This client is generated automatically using:

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.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page