PocketBase SDK for python.
Project description
PocketBase Python SDK
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 Client
client = Client('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.
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
pocketbase-0.2.1.tar.gz
(13.2 kB
view hashes)
Built Distribution
pocketbase-0.2.1-py3-none-any.whl
(21.5 kB
view hashes)
Close
Hashes for pocketbase-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e54277414cc25d3abf8ee0f6acf1f0233c54cb495c66c74d3d0c1ec1ac98c7fa |
|
MD5 | 8f141b90f83dae687b3aefbb889813ae |
|
BLAKE2b-256 | 5a9ad4618778e3eb5083d5a653e9d81ae05bc938295c727f6e10a6d6360852e2 |