Skip to main content

BosBase Python SDK

BosBase provides a batteries-included backend with collections, authentication, files, vector search, LangChaingo flows, realtime subscriptions, and more.
This package is the official Python SDK that mirrors the JavaScript and Dart SDKs in this repository so Python developers can talk to the BosBase API with a familiar API surface.

Installation

pip install bosbase

Quick start

from bosbase import BosBase

pb = BosBase("http://127.0.0.1:8090")

# Authenticate as auth collection record
auth = pb.collection("users").auth_with_password("test@example.com", "123456")
print(auth.token)

# List records
posts = pb.collection("posts").get_list(page=1, per_page=10, query={"expand": "author"})
for post in posts["items"]:
    print(post["title"])

# Create a record with a file
with open("cover.png", "rb") as handle:
    pb.collection("posts").create(
        body={"title": "Hello", "status": "published"},
        files={"cover": ("cover.png", handle, "image/png")},
    )

# Realtime subscription
unsubscribe = pb.collection("posts").subscribe("*", lambda event: print(event["action"]))
# ...
unsubscribe()

High-level features

  • pb.collection("...") – CRUD helpers, auth flows, OTP/MFA helpers, impersonation.
  • pb.collections – Manage collections, scaffolds, schema queries.
  • pb.files – Token generation and URL building for protected files.
  • pb.logs, pb.crons, pb.backups, pb.vectors, pb.llm_documents, pb.langchaingo, pb.caches – Service wrappers that mirror the JavaScript SDK.
  • pb.sql – Superuser SQL execution with column/row responses; pb.collections.register_sql_tables() and pb.collections.import_sql_tables() expose existing SQL tables as BosBase collections.
  • pb.realtime – SSE based realtime subscriptions with automatic reconnection.
  • pb.create_batch() – Transactional batch writes across collections.

The SDK exposes the same filter builder (pb.filter()), before_send / after_send hooks, and auth store semantics as the other SDKs, so existing examples port to Python with minimal changes.

Documentation

The docs/ directory mirrors the JavaScript SDK guides, adapted for Python. Highlights:

  • COLLECTIONS.md: collection types, scaffolds, schema queries.
  • API_RECORDS.md: CRUD, batch operations, auth helpers.
  • REALTIME.md: realtime subscriptions, connection lifecycle.
  • FILES.md, FILE_API.md: uploads, tokens, download URLs.
  • LANGCHAINGO_API.md, LLM_DOCUMENTS.md, VECTOR_API.md: AI and RAG workflows.
  • SQL_EXECUTION_API.md, SQL_TABLE_REGISTRATION.md: superuser SQL workflows and mapping existing tables to collections.

Every topic from the JS SDK now has a Python-specific counterpart with code samples.

See SDK_DOCUMENTATION.md in the repo for feature-specific guides.

Metadata

Release files for bosbase 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bosbase 0.1.5
File Size Uploaded Provenance Actions
bosbase-0.1.5.tar.gz 97.7 kB Without provenance Details for bosbase-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bosbase 0.1.5
File Interpreter ABI Platform Actions
bosbase-0.1.5-py3-none-any.whl Python 3 none any Details for bosbase-0.1.5-py3-none-any.whl

Total release size: 146.5 kB

Release files / bosbase-0.1.5.tar.gz

Download URL bosbase-0.1.5.tar.gz
Size 97.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6213fb23f50c1e3b5f31c2d12ba1393c24b18c015fa4620660a0c2c6ce57c745
BLAKE2b-256 checksum
How to use checksums
56652fd421aa5bc67a2e7beb63c6b2c6ea40869e810786593cf329061c8d71bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / bosbase-0.1.5-py3-none-any.whl

Download URL bosbase-0.1.5-py3-none-any.whl
Size 48.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35b16eee00e0287f825f34b04392dcbadfc0adc676f8620a3544d2607ee48c72
BLAKE2b-256 checksum
How to use checksums
cd610d8cce67da947757ef63f1ad4ff11c34a54c5b5a5e26e18f19b393184400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Security for bosbase 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page