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.4.0-cp39-abi3-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

langframe-0.4.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.4.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.4.0-cp39-abi3-macosx_10_12_x86_64.whl (7.2 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

langframe-0.4.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.4.0-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: langframe-0.4.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.4.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e1a8445821ddf537bbb6918f07f85f22cab749cde86a29d969de0c30179f353
MD5 3070e6f733e987f508fc5d92fab8a676
BLAKE2b-256 e335fd7b6c14f2df161513fa6ee3ed5f2724fc4b293ad1eef7fc21ed277ac8ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langframe-0.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc024c8efd523aa7b02fed9b3c9a3a79f423995ad1ca27d3d343e341d4cb22fd
MD5 56d148e9c0b43a69f28c9db5a2f4533e
BLAKE2b-256 63946f8c23bc6b41a23e887d15a6fd27a111f3110c9fd6a4e8d0e304677487a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langframe-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 35273eb3aa804df648cde332d8b0bd4be076b904a1ce5c984555573409648e57
MD5 a8236334158028a4bf81c1ab8f84660c
BLAKE2b-256 fccfe46002a7e69c6a61e25034b23fec6e879d5d5de6d3179e50ac8094caa842

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langframe-0.4.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 24dcd6e48d5669b82802fba4d57aad6b04c418a757021c24c95300eba08cee7b
MD5 04e75f8c5bcd1f0b9bc5673887866f7b
BLAKE2b-256 acb4a591f0d7801d9bf311b9b8116278fcf96e34007619f9042d1b677ee5919c

See more details on using hashes here.

File details

Details for the file langframe-0.4.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.4.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 90ab767dfb3a21f92e495b021ad8d296fff712a3afa178541569ddfb64a4cc13
MD5 14f8f4cad8007cd82a4b402f236b8f49
BLAKE2b-256 a1f7986de7eea22b8fd57e786ad17bce59c7461596648f55fde909601aaae2ce

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