sprintsolo-sally-db-client

raw JSON →
0.1.136 verified Sat May 09 auth: no python

A Prisma-based Python client for organization services, generated from a central repository. Version 0.1.136 targets Python >=3.11. This library provides auto-generated database access models and queries for Sally DB services.

pip install sprintsolo-sally-db-client
error ModuleNotFoundError: No module named 'sprintsolo_sally_db_client'
cause Importing using the package name with hyphens instead of underscores.
fix
Use import sally_db_client or from sally_db_client import ....
error AttributeError: module 'sally_db_client' has no attribute 'SallyClient'
cause The client class may have been renamed or not imported from the correct submodule.
fix
Check the documentation: from sally_db_client import SallyClient. If not present, use from sally_db_client.client import SallyClient.
error PrismaClientKnownRequestError: ... relation "organization" does not exist
cause The database schema does not match the generated client (e.g., missing migrations).
fix
Run prisma db push or prisma migrate dev to sync schema.
gotcha The package is generated automatically; manual changes to the client will be overwritten on regeneration.
fix Do not modify the client code; instead, fork or extend via middleware.
breaking The package name on PyPI uses hyphens, but the import path uses underscores. For example, use `import sally_db_client` not `import sprintsolo-sally-db-client`.
fix Always use the underscored version in Python imports.
deprecated Older versions may use `sprintsolo_sally_db_client` as the top-level module. This was changed to `sally_db_client` in recent releases.
fix Upgrade to >=0.1.100 and use `from sally_db_client import ...`.

Initialize the client with a DATABASE_URL env var and run a simple query.

import os
from sally_db_client import SallyClient

client = SallyClient(
    database_url=os.environ.get('DATABASE_URL', 'postgresql://...'),
    # other config
)
# Example: fetch all organizations
orgs = client.organization.find_many()
print(orgs)