Skip to main content

LangExtract AWS Bedrock Provider

A provider plugin for LangExtract that supports AWS Bedrock models.

Installation

pip install langextract-bedrock

Supported Model IDs

You can use any AWS Bedrock model by specifying it's ARN, for example:

config = factory.ModelConfig(model_id="anthropic.claude-3-5-sonnet-20240620-v1:0", provider="BedrockLanguageModel")
model = factory.create_model(config)

Environment Variables

Set any of the following environment variables:

For credentials:

  • AWS_PROFILE
  • AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY

For settings:

  • AWS_DEFAULT_REGION (defaults to us-east-1)

Usage

Use with lx.extract by pre-pending the model ARN with bedrock/:

import langextract as lx

result = lx.extract(
    text="Your document here",
    model_id="bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0",
    prompt_description="Extract entities",
    examples=[...]
)

Development

  1. Install in development mode: pip install -e .
  2. Run tests: python test_plugin.py, pytest -v tests/ (run pytest with AWS creds for AWS Bedrock inference tests)
  3. Build package: python -m build
  4. Publish to PyPI: twine upload dist/*

License

Apache License 2.0

Metadata

Release files for langextract-bedrock 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langextract-bedrock 0.1.6
File Size Uploaded
langextract_bedrock-0.1.6.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langextract-bedrock 0.1.6
File Interpreter ABI Platform
langextract_bedrock-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / langextract_bedrock-0.1.6.tar.gz

Download URL langextract_bedrock-0.1.6.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ace2d9b5d27b43269cf00b0b16b1ca8b836fd3e9c9b5db590bf82dfd46236b99
BLAKE2b-256 checksum
How to use checksums
3da5638308741d3a6099ff6da2d2fd923fa589c35d78557f40835bf531a9726f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / langextract_bedrock-0.1.6-py3-none-any.whl

Download URL langextract_bedrock-0.1.6-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c69b53894d17292ab54cf3ba29a42af31919d4932e4ae7546cb2910d2550df45
BLAKE2b-256 checksum
How to use checksums
421165274512efbd65fd901bcb24ebd5143f170ea328f75a0f4977ae085379d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page