Skip to main content

BerryDB

Install

pip install BerryDbNew

The PyPI distribution is named BerryDbNew; the import name is still berrydb. pip install berrydb installs a different, frozen distribution (last release 1.6.9) that no longer receives updates.

from berrydb import BerryDB

BerryDB.init("api.berrydb.io")          # the API host, not app.berrydb.io (the web app)
db = BerryDB.connect(api_key, "MyDatabase")

Bulk writes (1.6.10+)

from berrydb import BerryDB

BerryDB.init("api.berrydb.io")
db = BerryDB.connect(api_key, "MyDatabase")

# Documents: batched POST /berrydb/documents/bulk (500 per request, retries on 429/5xx).
# An upsert REPLACES each stored document - send complete documents.
result = db.bulk_upsert(documents)
print(result["upserted"], "written;", result["failed"], "failed")

# Annotations: async POST /berrydb/annotate-bulk job, polled until finished.
# Merged server-side (like add_annotations); falls back to per-document calls on older servers.
result = db.bulk_annotate(
    [{"document_id": doc_id, "annotations": [annotation]} for doc_id, annotation in pairs],
    task="ner", annotated_field="content.text",
)
print(result["status"], result["succeeded"], result["failed"], result["errors"][:5])

db.upsert(list) keeps working and now batches lists longer than 500 documents; db.get_all_documents() follows server-side pages so it still returns every document.

Logging and API keys

The SDK never prints or logs API keys: request URLs (which carry the apiKey query parameter), exception messages and debug output are redacted, and the SDK no longer changes your root logger level. To see SDK diagnostics, set constants.constants.debug_mode = True and enable DEBUG for the SDK's loggers.

See CHANGELOG.md for details.

Metadata

Release files for BerryDbNew 1.7.6

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

Source distribution (sdist)

Source distribution for BerryDbNew 1.7.6
File Size Uploaded Provenance Actions
berrydbnew-1.7.6.tar.gz 84.5 kB Without provenance Details for berrydbnew-1.7.6.tar.gz

Built distribution (wheel)

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

Total release size: 180.9 kB

Release files / berrydbnew-1.7.6.tar.gz

Download URL berrydbnew-1.7.6.tar.gz
Size 84.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5f5d24cd19cc55528a09d72d2036470b2aa37df49c60ee623131716b857b6a95
BLAKE2b-256 checksum
How to use checksums
f33be1b8180425640ed4ebd6e44b4e883c60a6c03eab413145e7b3e5f3355042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.16 Linux/7.0.0-1012-aws

Release files / berrydbnew-1.7.6-py3-none-any.whl

Download URL berrydbnew-1.7.6-py3-none-any.whl
Size 96.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6bb5110a110ea95d0d60884b7a40f898d374e8959495179d64e8ba9a1e637d0
BLAKE2b-256 checksum
How to use checksums
4a4ec27e0979f8d0eaa234a87bb0cef57280d16230e6ac70b93d516a787e4cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.11.16 Linux/7.0.0-1012-aws

Security for BerryDbNew 1.7.6

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