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.1.tar.gz (11.2 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.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lmux_bedrock_shared-0.2.1.tar.gz
  • Upload date:
  • Size: 11.2 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.1.tar.gz
Algorithm Hash digest
SHA256 22c87576443cdf908f7c5c9949328aa4c5731d9937e4cb84b6d334ffba13bb61
MD5 5c04899dd836478258f6c41e7479f95a
BLAKE2b-256 dcfb70baf857ee4fd194b25f22b69f51fa04585f604ce13e82cf5a0cf41c7274

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmux_bedrock_shared-0.2.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lmux_bedrock_shared-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c186c37debf8b08a8867eca7b69262bba44bb2c977754f161587ef67487ef7d
MD5 b642cea517c1158ecb385809845cee34
BLAKE2b-256 8bbd64b3a4447892834b114c59185e32bc911edde734aa4157c41ebbb9c49b4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmux_bedrock_shared-0.2.1-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