semvec/pypi-packages huggingface dataset:
braintrust-langchain 0.2.1
Integration for LangChain and Braintrust Tracing
Requires Python: >=3.10
Keywords: braintrust, langchain, llm, tracing, ai, agents

# braintrust-langchain

SDK for integrating [Braintrust](https://braintrust.dev) with [LangChain](https://langchain.com/). This package provides a callback handler to automatically log LangChain executions to Braintrust.

## Installation

```bash
pip install braintrust-langchain
```

## Requirements

- Python >= 3.9
- LangChain >= 0.1.0

## Usage

First, make sure you have your Braintrust API key set in your environment:

```bash
export BRAINTRUST_API_KEY="your-api-key"
```

### Basic Usage

```python
import asyncio
from braintrust import init_logger
from braintrust_langchain import BraintrustCallbackHandler, set_global_handler
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate


async def main():
    # Initialize the logger with your project
    init_logger(project="your-project-name")

    # Create the callback handler and set it globally for all LangChain components
    handler = BraintrustCallbackHandler()
    set_global_handler(handler)

    # Initialize your LangChain components
    prompt = ChatPromptTemplate.from_template("What is 1 + {number}?")
    model = ChatOpenAI()

    # Create a simple chain
    chain = prompt | model

    # Use LangChain as normal - all calls will be logged to Braintrust
    response = await chain.ainvoke({"number": "2"})


if __name__ == "__main__":
    asyncio.run(main())
```

If you'd prefer to pass the callback handler to specific LangChain calls instead of setting it globally, you can do so using the `callbacks` config option:

```python
async def main():
    handler = BraintrustCallbackHandler()

    # Pass the handler to specific calls
    response = await chain.ainvoke(
        {"number": "2"},
        config={"callbacks": [handler]}
    )

    # Or initialize components with the handler
    model = ChatOpenAI(callbacks=[handler])
```

### Supported Features

The callback handler supports logging for:

- LLM calls (including streaming)
- Chat model interactions
- Chain executions
- Tool/Agent usage
- Memory operations
- State management (LangGraph)

Review the [LangChain documentation](https://python.langchain.com/docs/modules/callbacks/) for more information on how to use callbacks.

## Development

Contributions are welcomed!

```bash
git clone https://github.com/braintrustdata/sdk.git

cd sdk/integrations/langchain-py

pip install -e ".[dev]"

# work on the code

pytest
```
colin-py 0.1.2
A context engine for the AI era
Requires Python: >=3.10
Keywords: agent, ai, context, lineage, llm, mcp, skills

<div align="center">

<picture>
  <img width="550" alt="Colin Logo" src="docs/assets/logos/c-watercolors.png">
</picture>

# Colin

**A context engine that keeps agent skills fresh.**

</div>

---

Colin is a context engine. Write templates that reference live sources—GitHub, Linear, Notion, HTTP endpoints—and other documents. Colin compiles them, tracks dependencies, and rebuilds only what's stale.

```markdown
---
name: team-status
description: Current state of platform team work
colin:
  cache:
    expires: 1d
---

# Team Status

## In Progress

{% for issue in colin.linear.issues(team='Platform', state='In Progress') %}
- {{ issue.identifier }}: {{ issue.title }} ({{ issue.assignee }})
{% endfor %}

## Summary

{{ ref('team/weekly-notes.md').content | llm_extract('key blockers and priorities') }}
```

Run `colin run`. Colin fetches the Linear issues, resolves the reference to your weekly notes, extracts blockers via LLM, and writes the compiled skill. Run it again tomorrow—if nothing changed upstream, nothing rebuilds. The `expires: 1d` ensures time-sensitive content stays fresh.

## Install

```bash
pip install colin-py
```

## Documentation

Full documentation at [colin.prefect.io](https://colin.prefect.io).

## Quick Start

The fastest way to get started is with the quickstart blueprint, which builds a skill from Colin's own documentation:

```bash
colin init using-colin -b quickstart
cd using-colin
colin run
```

The compiled skill contains the Colin quickstart—pulled live from GitHub. When we update the docs, your agent's knowledge updates too.

## Output to Claude Code

Configure Colin to write directly to Claude Code's skills folder:

```toml
[project.output]
target = "claude-skill"
```

Skills appear in `~/.claude/skills/` and become available immediately.

## How It Works

When Colin compiles a document, it records what sources were used and their versions—commit SHAs for GitHub files, timestamps for HTTP resources, version identifiers for MCP resources. This information is stored in a manifest alongside the compiled output.

On subsequent runs, Colin checks the manifest against current source versions. Documents whose sources haven't changed skip compilation entirely. When a source does change, Colin recompiles the affected document and any documents that depend on it.

LLM calls are cached separately by input hash. If a document recompiles but the input to an LLM block is unchanged, the cached LLM response is reused.

## About the Name

Colin stands for **Co**ntext **Lin**eage. It's also a nod to [Colin the robot](https://hitchhikers.fandom.com/wiki/Colin) from the Hitchhiker's Guide to the Galaxy—a security robot who feels genuinely delighted whenever he's being helpful.

---

Colin is built with 💙 by [Prefect](https://prefect.io).
reos 0.1.0
ℜeos: A Rust Library for Equations Of State and Thermodynamics
Requires Python: >=3.8

# Welcome to ℜ*eos*

[![docs](https://img.shields.io/badge/docs-github--pages-blue?logo=github)](https://emanukka.github.io/reos/)

ℜ*eos* is a thermodynamic library written in **Rust** with a **Python interface**. It provides tools for calculating thermodynamic properties and phase equilibria.

```python
import numpy as np
from reos.cpa import CPAParameters, CPAPureRecord
from reos.eos import EquationOfState
from reos.state import State

parameters = CPAParameters.from_records([ 
    CPAPureRecord.new(
        name = "water",
        molar_weight = 18.01528,
        a0 = 0.12277,
        b = 0.014515e-3,
        c1 = 0.67359,
        tc = 647.29,
        epsilon = 166.55e2,
        kappa = 0.0692,
        na = 2,
        nb = 2
    )
])

# or  CPAParameters.from_json(["water"], "./parameters/cpa/kontogeorgis2006.json")

eos = EquationOfState.scpa(parameters)

t = 298.15
p = 1e5
x = np.array([1.0])

s = State.tpx(eos, t, p, x) 

print(s)

X = eos.unbonded_sites_fraction(t, s.density, x)

print(f"Unbonded sites fraction = {X}")

```

```bash
State(t = 298.150 K, p = 100000.000000 Pa, ρ = 55784.919890 mol/m³)
Unbonded sites fraction = [0.07825138 0.07825138]
```

## Models

| Model | Description |
|:-----:|:-----------:|
| CPA   | Cubic Plus Association (srk, pr76, pr78)|
| cubic | Soave-Redlich-Kwong, Peng-Robinson 1976, Peng-Robinson 1978|

Each model implement its analytical expressions of derived properties of Helmholtz potential.

## Installation

### Python

#### From pip

```bash
pip install reos
```

#### From source

You must have rust compiler and [maturin/PyO3](https://pyo3.rs/v0.27.2/) installed.

To install the python package in your machine (such `pip install -e .`) and use the optimized version of the package:

```bash
cd pyreos
maturin develop --release 
```

To build the the python wheel, just use

```bash
maturin build --release 
```

## Project layout

### Repository

```bash
├── crates
├── parameters
├── pyreos
├── pyreos-dev
└── pyreos-examples
```

- `crates`: Contains `reos`, which is the Rust package that implement all the core functionalites
- `pyreos`: Rust package that create the Python interface from `reos`
- `pyreos-dev`: Directory used to test functionalites of `reos` in Python
- `pyreos-examples`: Python examples of how to use `reos`

### Python package

- `reos.eos`: Enables the creation and manipulation of equations of state with different models.
- `reos.state`: Provides tools for working with thermodynamic states, including property calculations and phase equilibria.
- `reos.{model_name}`: Each current model has its own submodule with its name, which contains the **pure model record**, the **binary model record** and the **parameters objects** .