Skip to main content

Official MACSS SQL Server integration package for Python.

Project description

macss-modular-api-sqlserver

Official MACSS SQL Server integration package for Python.

Quick start

from modular_api_sqlserver 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.

What this package provides

  • normalized SQL Server 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
  • the application supplies the driver binding (adapter) for its chosen engine and driver

This package is contracts-only by design and will never ship a driver binding; you choose your engine and driver and provide the adapter. See ADR-0004.

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_sqlserver-0.6.0.tar.gz (9.2 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_sqlserver-0.6.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file macss_modular_api_sqlserver-0.6.0.tar.gz.

File metadata

File hashes

Hashes for macss_modular_api_sqlserver-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e724c5ca0fb86f84015fc6d12df5b46d39f4f5970ac76e4ebb59b300e8611b58
MD5 4064507e86b12eb48084161e5dd0e96a
BLAKE2b-256 9b0bc3cd789f207038979e44a61408df956a640bc40e421edce81b95c266b1d2

See more details on using hashes here.

File details

Details for the file macss_modular_api_sqlserver-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for macss_modular_api_sqlserver-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f93a182762ecc5a3b7664ff26f4388c2bad0aa73e3bb37d08ee1364c01992002
MD5 a6490647ac8f57f357730f48b01021d8
BLAKE2b-256 cda9131e6c63972d66ba845240c58a4a681589aa5adfebeabd9c7867fedc09fe

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