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.1.0.tar.gz (9.8 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.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lmux_bedrock_shared-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 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.1.0.tar.gz
Algorithm Hash digest
SHA256 18db33b892898a144ef723d11c1548593d599e15180a34b40fc3fb3021acb5cd
MD5 ba7f36c5a31d3521a994ceab0e09990f
BLAKE2b-256 bffa5f96fb262574827f71bc4585ce1a722e91d6d25e295188f8b4ef1ab8114d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for lmux_bedrock_shared-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25c6989da2980ef01d39040999a97f00a567544c15a718f1b98b281871f1b377
MD5 3b40f1ea6b02365423cd64bd7671c177
BLAKE2b-256 77006d1870a4c04e35582f3e4ede4e93bf506aa0f978acb3e6f86edeb0bf98e4

See more details on using hashes here.

Provenance

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