Skip to main content

pydantic_ai_bedrock

https://github.com/pydantic/pydantic-ai/issues/118#issuecomment-2589200395

Install

pip install pydantic_ai_bedrock

Usage

from pydantic_ai import Agent
from pydantic_ai_bedrock.bedrock import (
    BedrockModel,
)  # Replace with `pydantic_ai.bedrock import BedrockModel` when pydantic_ai support bedrock

model = BedrockModel(
    model_name="anthropic.claude-3-5-sonnet-20241022-v2:0",
)
agent = Agent(model, system_prompt="You are a helpful assistant.")


if __name__ == "__main__":
    result = agent.run_sync("Hello world!")
    print(result.data)
    print(result.usage())

Develop

Install pre-commit before commit

pip install pre-commit
pre-commit install

Install package locally

pip install -e .[test]

Metadata

Release files for pydantic-ai-bedrock 0.2.2

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

Source distribution (sdist)

Source distribution for pydantic-ai-bedrock 0.2.2
File Size Uploaded Provenance
pydantic_ai_bedrock-0.2.2.tar.gz 20.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-ai-bedrock 0.2.2
File Interpreter ABI Platform
pydantic_ai_bedrock-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / pydantic_ai_bedrock-0.2.2.tar.gz

Download URL pydantic_ai_bedrock-0.2.2.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
63b2ae35012200c071ad15c756c5ecc31d54b692de2099cf2173820802b3a29e
BLAKE2b-256 checksum
How to use checksums
1ca3b08af2e92a9f7746947b1eb1d40a9d165ca1e9d93f6aef01cac9d94b0ef1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / pydantic_ai_bedrock-0.2.2-py3-none-any.whl

Download URL pydantic_ai_bedrock-0.2.2-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de4c3cb83dcd73415052c8ecc439a3d8938496e303082f67cc6dda8dbca12728
BLAKE2b-256 checksum
How to use checksums
edbf20e7279cfff1a7c7963a9ef2e9818d2195a4c04bdb4e350c4506b9e9ea26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for pydantic-ai-bedrock 0.2.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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