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 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.
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 pocketbase-0.2.2.tar.gz.
File metadata
- Download URL: pocketbase-0.2.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.7 Linux/5.19.11-200.fc36.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
595e27c09d12dbb336605d93b7781ed7a794843bf1f807522d913f732fe776b3
|
|
| MD5 |
691ac4b61a0ddcbd05d0a29e8c24cad0
|
|
| BLAKE2b-256 |
d3c6d75da5625871eaf75981b4005e040cb869baf7f6da0f553aa8af3ccbb96e
|
File details
Details for the file pocketbase-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pocketbase-0.2.2-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.10.7 Linux/5.19.11-200.fc36.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99eb76e5073407492a78c346fb4e385ba49b5aaa38ffed333efbc705cb8d74ee
|
|
| MD5 |
d560ea840ddd42e72450321592a2c3db
|
|
| BLAKE2b-256 |
cd7e1e00d330d814816830d97dafd90f084d5e55996631d456774e4397964c99
|