Skip to main content

Official MACSS Postgres integration package for Python.

Project description

macss-modular-api-postgres

Official MACSS Postgres integration package for Python.

Quick start

from modular_api_postgres import DbClient, DbCommand, DbCommandKind, DbConnectionSettings

settings = DbConnectionSettings.from_environment()

client = DbClient(
    settings=settings,
    session_provider=my_session_provider,
    command_executor=my_command_executor,
    transaction_runner=my_transaction_runner,
)

result = client.scalar(
    DbCommand(
        kind=DbCommandKind.SCALAR,
        text="select count(*) from users",
        label="users.count",
    )
)

if result.is_success:
    print(result.value.value)
else:
    print(result.failure.message)

See example/example.py for a complete in-memory wiring sample.

Current slice

  • normalized Postgres connection defaults and redacted summaries
  • engine-agnostic DbClient, DbRepository, and transaction contracts
  • explicit lease ownership semantics for package-owned and application-owned sessions
  • health contributor and GraphQL support bundle for higher-level integrations
  • real driver bindings intentionally remain outside this first slice

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macss_modular_api_postgres-0.4.7.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macss_modular_api_postgres-0.4.7-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file macss_modular_api_postgres-0.4.7.tar.gz.

File metadata

File hashes

Hashes for macss_modular_api_postgres-0.4.7.tar.gz
Algorithm Hash digest
SHA256 7cee7eedb5e1321dd4c42a252e60b7eb2083cd703cef51949b88d1f3aa96c941
MD5 c5925db5b7bd179da198aaa8bfac5ec2
BLAKE2b-256 454f8972531f20fe1d6b2637d0bc4a5275a872d14eaddf4c6fa3771e9bb440b6

See more details on using hashes here.

File details

Details for the file macss_modular_api_postgres-0.4.7-py3-none-any.whl.

File metadata

File hashes

Hashes for macss_modular_api_postgres-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e47f3d51c3f893cc47587239368eda4c1ffe265003e45199de7f41f650aaa286
MD5 6cdd420b28bac4d48f00d3c4a0f8c3a5
BLAKE2b-256 de1c9b3b9405acb486f286b6eb95b22ae76c6ce89515b5fe81077a1981e0c2d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page