Install

For live channels, add the realtime extra: pip install "pawabase[realtime]".

Create the client

Always pass environment with the name of the environment your key belongs to. The Python client sends development when you leave it out, and a key from any other environment is then refused with 401 invalid_api_key (this key does not belong to environment ‘development’).
Use a publishable key (pb_pk_…) when acting for a user, and a secret key (pb_sk_…) from a trusted server only. A secret key bypasses your access rules.

Sign in

The session is kept in memory. To keep it between runs of a script, give the client a file:

Read and write data

from_ has a trailing underscore because from is a Python keyword.

Async

AsyncPawabase has the same methods, awaited:

Handle errors

See Errors for every code.

Files, flows and AI

On a server, for one person

Act for a signed-in person with the publishable key and their tokens, so your access rules apply to them:
Use a separate client with a secret key for admin work (pb.admin, pb.manage), never per request.

Auth

Every way to sign users in.

Database

Query and write records.