perfalle 10496553ed
update to pocketbase version 0.8.0-rc2 (#4)
update to pocketbase version 0.8.0-rc1

fixed flake8 errors,
but there are still remaining errors:
F401 ... imported but unused
E501 line too long (... > 79 characters)
E722 do not use bare 'except'
2022-11-08 16:50:38 +01:00
2022-09-26 14:55:49 -04:00
2022-09-19 10:55:41 -04:00
2022-09-19 11:57:04 -04:00
2022-09-19 11:34:00 -04:00

PocketBase Python SDK

Tests

Python client SDK for the PocketBase backend.

This is in early development, and at first is just a translation of the javascript lib using HTTPX.


Installation

Install PocketBase using pip:

$ pip install pocketbase

Usage

The rule of thumb here is just to use it as you would the javascript lib, but in a pythonic way of course!

from pocketbase import PocketBase # Client also works the same

client = PocketBase('http://127.0.0.1:8090')

...

# list and filter "example" collection records
result = client.records.get_list(
    "example", 1, 20, {"filter": 'status = true && created > "2022-08-01 10:00:00"'}
)

# authenticate as regular user
user_data = client.users.auth_via_email("test@example.com", "123456")

# or as admin
admin_data = client.admins.auth_via_email("test@example.com", "123456")

# and much more...

More detailed API docs and copy-paste examples could be found in the API documentation for each service. Just remember to 'pythonize it' 🙃.

The PocketBase Python SDK is MIT licensed code.

Description
PocketBase client SDK for python
Readme 212 KiB
Languages
Python 100%