Skip to main content

Shared AWS Bedrock internals (SigV4 signing, event-stream decoding, Anthropic pricing) for lmux

Project description

lmux-bedrock-shared

Shared internals for the two lmux providers that talk to Amazon Bedrock:

  • lmux-aws-bedrock — the Converse-API provider (all Bedrock vendors + embeddings).
  • lmux-anthropic [bedrock] — the native Anthropic Messages API provider (AnthropicBedrockProvider).

It exists so those two packages don't duplicate the AWS-specific transport code or the Anthropic-on-Bedrock pricing table, while keeping core lmux free of any AWS-specific code.

Contents

Module Purpose
sigv4.py sign() — minimal, stdlib-only AWS Signature Version 4 signer (unit-tested for byte-parity against botocore.auth.SigV4Auth).
eventstream.py EventStreamDecoder / decode_messages — stdlib-only decoder for AWS's binary vnd.amazon.eventstream framing.
pricing.py ANTHROPIC_PRICING + calculate_bedrock_anthropic_cost() — the Anthropic-on-Bedrock pricing subset, generated by scripts/update_bedrock_pricing.py. Shared so both providers price Claude identically.

sigv4/eventstream are pure stdlib. pricing depends only on lmux (for the pricing types). This package is an internal building block; its API is not intended for direct use outside the lmux Bedrock providers.

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

lmux_bedrock_shared-0.2.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

lmux_bedrock_shared-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file lmux_bedrock_shared-0.2.0.tar.gz.

File metadata

  • Download URL: lmux_bedrock_shared-0.2.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for lmux_bedrock_shared-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9c08ad702af638bdc9511bfba48aff8fe19e3d862e3c715a18d678feeb262c58
MD5 b7b6cbeae8ceafc53e7070ad1ee5ffb0
BLAKE2b-256 4292e8acc091d277671dd3424bf41edd365379192750331711dd3a6d4b49adf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmux_bedrock_shared-0.2.0.tar.gz:

Publisher: publish.yml on cluebbehusen/lmux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lmux_bedrock_shared-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lmux_bedrock_shared-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2ee32ec7edc2de8d26881b6bf4f2435abfb3fbcc9396cd63d33b8fefe80774
MD5 fc0bba3d97b88a4dbc2c9d95dc56c731
BLAKE2b-256 cf9ea20851dd349da5f3c61f4fea005eaf00c9b23ae1d33af962f5a67cadef31

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmux_bedrock_shared-0.2.0-py3-none-any.whl:

Publisher: publish.yml on cluebbehusen/lmux

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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