Skip to main content

langframe is a Python DataFrame library for processing text data with APIs inspired by PySpark.

Project description

Author-email: typedef <hello@typedef.ai> License: Apache-2.0 Requires-Python: >=3.10, <3.13 Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM Project-URL: Homepage, https://github.com/typedef-ai/langframe Project-URL: Issues, https://github.com/typedef-ai/langframe/issues

# langframe

langframe is a Python DataFrame library for processing text data, with APIs inspired by PySpark. It includes utilities tailored to working with language and special operations called semantic operators, which use large language models (LLMs) to batch-transform data.

## 📁 Directory Structure

The repository is organized as follows:

`bash langframe/ ├── src/langframe/ # Core library │ ├── api/ # Public API (e.g., DataFrame, Column, functions) │ ├── _backends/ # Execution backends: local and cloud (Typedef) │ ├── _logical_plan/ # Logical plan representation for operators ├── rust/ # Rust crates compiled with Maturin ├── tests/ # Test suite structured to match the source layout `

## 🛠️ Development Setup

Local development requires uv and a Rust toolchain.

### First-Time Setup

From the root of the repo:

`bash uv run maturin develop --uv `

This will:

  • Create a virtual environment

  • Build the Rust crate

  • Install Python dependencies

  • Set up the package in editable mode

> This command also places the built dynamic Rust library inside src/langframe.

### Making Changes

  • To apply changes made to Python code:

    `bash uv sync `

  • To apply changes made to Rust code:

    `bash uv run maturin develop --uv `

    Add –release or -r to build the Rust crate in release mode (better performance).

## ✅ Running Tests

Run an individual test file:

`bash uv run pytest tests/path/to/test_foo.py `

Run all tests for the local backend:

`bash uv run pytest -m "not cloud" tests `

Run all tests for the cloud backend:

`bash uv sync --extra cloud # Installs cloud-specific dependencies uv run pytest -m cloud tests `

> ⚠️ Note: All tests require a valid OpenAI API key set in the environment variables.

## 📓 Running Notebooks (VSCode / Cursor)

To run demo notebooks:

  1. Install the Jupyter extension.

  2. Add the .venv path to Python: Venv Folders in VSCode settings: - Open settings: Preferences: Open User Settings - Go to Extensions → Python → Python: Venv Folders

  3. Open a notebook, select the correct kernel from your virtual environment, and run cells.

> Restart the kernel to reflect any code changes made to the langframe source.

Have questions or want to contribute? Let us know!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

langframe-0.3.0-cp39-abi3-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

langframe-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

langframe-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (7.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl (7.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (13.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file langframe-0.3.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: langframe-0.3.0-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.6

File hashes

Hashes for langframe-0.3.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 60839cbcf6653699d8348e770a3070ebd524c1c0f539f7e79b5a5baa49cbdf8e
MD5 5732539d39431d15519905571b3c487d
BLAKE2b-256 61c489111a344fb98c39d1ac2143469f1597a8dc1606a7af1f6799ca82698697

See more details on using hashes here.

File details

Details for the file langframe-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for langframe-0.3.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37f611d2d0bdef23ae6a443171fd5d330d25c62b51ed7ae5d0f6c3c323b0cf93
MD5 ca95996197cb6b17c4867b3476e5b604
BLAKE2b-256 0e92d7b6da99737d8ab6eaf059ede43330e9d88c7ca37576e1035c90f5e57ac1

See more details on using hashes here.

File details

Details for the file langframe-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for langframe-0.3.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e9e0144e854d50b0ddcabd19ca0032378cc40ee8d7e7787dc4266f2d8f4ffb9c
MD5 1bf31a43a67fb5f92e1514c03ebb4db2
BLAKE2b-256 8bafcb239cf188112ae8a1c377c95fe5d385d4dee1680a1c307df2361523f7fd

See more details on using hashes here.

File details

Details for the file langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 abb5df74f3053e159f4459794bc5682447d2b4117fe4fe1215adde2cfa773f90
MD5 d1f4e21418ee90a9843d479e66748879
BLAKE2b-256 cc3501716a50713a9c1e26bd2246b0345169343d9417435acf6c08ce716bc752

See more details on using hashes here.

File details

Details for the file langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for langframe-0.3.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 aa00fd65aded30fe1ddafc3a2f8d6e98674fb459c840de244c40677600929e81
MD5 fd3d07ecee4292ba80a83a4047b61b4e
BLAKE2b-256 eab4de7824403efd74d86d93a45d52edfc18fb1d332dc12c160c9b96cbfcb445

See more details on using hashes here.

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