{"id":13409888,"url":"https://github.com/vaphes/pocketbase","last_synced_at":"2026-01-18T12:21:40.230Z","repository":{"id":59708593,"uuid":"538553958","full_name":"vaphes/pocketbase","owner":"vaphes","description":"PocketBase client SDK for python","archived":false,"fork":false,"pushed_at":"2025-08-27T15:04:11.000Z","size":245,"stargazers_count":514,"open_issues_count":16,"forks_count":58,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-08T08:50:09.527Z","etag":null,"topics":["client","database","pocketbase","python","sdk"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pocketbase/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaphes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-19T14:53:14.000Z","updated_at":"2025-12-03T14:09:16.000Z","dependencies_parsed_at":"2024-04-26T16:43:45.510Z","dependency_job_id":"3d82e07f-0483-4ff7-b236-4a9790401413","html_url":"https://github.com/vaphes/pocketbase","commit_stats":{"total_commits":39,"total_committers":4,"mean_commits":9.75,"dds":"0.10256410256410253","last_synced_commit":"aacd12bafe76819fba62b7e63c6a8d39a52bc881"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/vaphes/pocketbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaphes%2Fpocketbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaphes%2Fpocketbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaphes%2Fpocketbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaphes%2Fpocketbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaphes","download_url":"https://codeload.github.com/vaphes/pocketbase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaphes%2Fpocketbase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","database","pocketbase","python","sdk"],"created_at":"2024-07-30T20:01:03.895Z","updated_at":"2026-01-18T12:21:40.215Z","avatar_url":"https://github.com/vaphes.png","language":"Python","readme":"# PocketBase Python SDK\n\n[![Tests](https://github.com/vaphes/pocketbase/actions/workflows/tests.yml/badge.svg)](https://github.com/vaphes/pocketbase/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/vaphes/pocketbase/badge.svg?branch=master)](https://coveralls.io/github/vaphes/pocketbase?branch=master)\n\nPython client SDK for the \u003ca href=\"https://pocketbase.io/\"\u003ePocketBase\u003c/a\u003e backend.\n\nThis is in early development, and at first is just a translation of \u003ca href=\"https://github.com/pocketbase/js-sdk\"\u003ethe javascript lib\u003c/a\u003e using \u003ca href=\"https://github.com/encode/httpx/\"\u003eHTTPX\u003c/a\u003e.\n\n---\n\n## Installation\n\nInstall PocketBase using PIP:\n\n```shell\npython3 -m pip install pocketbase\n```\n\n## Usage\n\nThe rule of thumb here is just to use it as you would \u003ca href=\"https://github.com/pocketbase/js-sdk\"\u003ethe javascript lib\u003c/a\u003e, but in a pythonic way of course!\n\n```python\nfrom pocketbase import PocketBase  # Client also works the same\nfrom pocketbase.client import FileUpload\n\nclient = PocketBase('http://127.0.0.1:8090')\n\n# authenticate as regular user\nuser_data = client.collection(\"users\").auth_with_password(\n    \"user@example.com\", \"0123456789\")\n# check if user token is valid\nuser_data.is_valid\n\n# or as admin\nadmin_data = client.admins.auth_with_password(\"test@example.com\", \"0123456789\")\n\n# check if admin token is valid\nadmin_data.is_valid\n\n# list and filter \"example\" collection records\nresult = client.collection(\"example\").get_list(\n    1, 20, {\"filter\": 'status = true \u0026\u0026 created \u003e \"2022-08-01 10:00:00\"'})\n\n# create record and upload file to image field\nresult = client.collection(\"example\").create(\n    {\n        \"status\": \"true\",\n        \"image\": FileUpload((\"image.png\", open(\"image.png\", \"rb\"))),\n    })\n\n# and much more...\n```\n\u003e More detailed API docs and copy-paste examples could be found in the [API documentation for each service](https://pocketbase.io/docs/api-authentication). Just remember to 'pythonize it' 🙃.\n\n---\n\n**Note:** By default, camelCase (or any other key style) from the API is converted to snake_case in Python. You can keep the original keys by setting `auto_snake_case=False` when creating the client.\n\n```python\nfrom pocketbase import Client\nclient = Client(auto_snake_case=False)\n# Fields will keep their original names from the API\n```\n\n## Development\n\nThese are the requirements for local development:\n\n* Python 3.9+\n* Poetry (https://python-poetry.org/)\n\nYou can install locally:\n\n```shell\npoetry install\n```\n\nOr can build and generate a package:\n\n```shell\npoetry build\n```\n\nBut if you are using only PIP, use this command:\n\n```shell\npython3 -m pip install -e .\n```\n\n## Tests\n\nTo execute the tests use this command:\n\n```\npoetry run pytest\n```\n\n## Sandbox integration testing\n\nA lot of real-world integration test against a sandboxed pocketbase instance will be included in the pytest when the sandbox is running (on 127.0.0.1:8090)\nto start the sandbox follow the following steps:\n```bash\nexport TMP_EMAIL_DIR=`mktemp -d`  # Export temp dir used for sendmail sandbox\nbash ./tests/integration/pocketbase     # Run the pocketbase sandbox (automatically downloads the latest pocketbase instance)\npytest  # Run test including sandbox API integration tests\n```\n## License\n\nThe PocketBase Python SDK is \u003ca href=\"https://github.com/vaphes/pocketbase/blob/master/LICENCE.txt\"\u003eMIT licensed\u003c/a\u003e code.\n","funding_links":[],"categories":["Unofficial PocketBase Clients (SDKs)","Python"],"sub_categories":["Node.js"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaphes%2Fpocketbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaphes%2Fpocketbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaphes%2Fpocketbase/lists"}