This page describes the Python package workspace layout, the pyproject.toml files for each package, the uv.lock dependency lockfile, and how dependency versions are pinned across the monorepo. For information about running Make targets to build and test the workspace, see Makefile Commands. For the frontend npm build pipeline, see Frontend Build Pipeline. For code quality tooling configured within pyproject.toml, see Code Quality Tools.
Langflow uses uv as its Python package manager. The repository is a uv workspace: a monorepo containing multiple Python packages that share a single lockfile.
The workspace is declared in the root pyproject.toml:
This registers three workspace members, each with its own pyproject.toml:
| Member path | Package name | Version |
|---|---|---|
. (repo root) | langflow | 1.8.0 |
src/backend/base | langflow-base | 0.8.0 |
src/lfx | lfx | 0.3.0 |
Sources:
The three packages form a strict linear dependency chain.
Workspace Dependency Chain
The [tool.uv.sources] section in the root pyproject.toml redirects these dependency specifiers to local workspace paths rather than PyPI during development:
Sources:
pyproject.toml LayoutThe root pyproject.toml is the workspace anchor and the definition for the langflow distribution package.
Root pyproject.toml Section Map
[project]name = "langflow", version = "1.8.0"requires-python = ">=3.10,<3.14" — Python 3.10 through 3.13 are supported.license = "MIT"[project.dependencies]The langflow package has a single runtime dependency: langflow-base[complete]~=0.8.0. The complete extra pulls in all optional integrations from langflow-base.
[dependency-groups] → devDevelopment dependencies used for testing and code quality. These include:
pytest, pytest-asyncio, pytest-xdist, pytest-cov, pytest-mockruff, mypyhypothesis, locust, pre-commit, httpxThese are installed by uv sync but not included in distributed packages.
[project.optional-dependencies]Optional extras extend langflow for specialized use cases:
| Extra | Purpose |
|---|---|
docling | Advanced document parsing with Docling, tesserocr, and CPU-only PyTorch |
audio | WebRTC VAD for voice features |
couchbase | Couchbase vector store |
cassio | Cassandra/Astra vector store |
local | Local LLM inference (llama-cpp-python, sentence-transformers) |
clickhouse-connect | ClickHouse integration |
nv-ingest | NVIDIA Ingest pipeline (Python 3.12+ only) |
postgresql | PostgreSQL async driver via SQLAlchemy |
[project.scripts]Installs the langflow CLI command pointing to langflow.langflow_launcher:main.
[tool.hatch.build.targets.wheel]When building the langflow wheel, Hatchling packages the contents of src/backend/langflow/. Note that the source code lives under src/backend/langflow/ but the installed package namespace is langflow.
Sources:
langflow-base pyproject.toml Layoutsrc/backend/base/pyproject.toml1-488
langflow-base is the core backend library. Key differences from the root:
name = "langflow-base", version = "0.8.0"complete extra that aggregates all optional integrationssrc/backend/base/pyproject.toml140-141
The langflow-base wheel packages the directory src/backend/base/langflow/ (relative to its own pyproject.toml). The installed namespace is also langflow.
complete Extrasrc/backend/base/pyproject.toml368-484
The complete extra is an aggregate that includes every optional integration:
This is what langflow references as langflow-base[complete].
Sources:
lfx pyproject.toml Layoutlfx is the lightweight executor package. Key characteristics:
name = "lfx", version = "0.3.0"langchain-core, pydantic, fastapi, uvicorn, typer, aiofiles, networkx, loguru, structloglfx CLI entry point: lfx.__main__:mainSources:
uv.lockA single uv.lock file at the repository root pins all resolved dependencies across the entire workspace.
uv resolves dependencies per platform and Python version combination. The lockfile uses resolution markers to capture platform-specific packages (e.g., torch has different wheels for macOS x86_64, macOS arm64, and Linux/Windows). This ensures reproducible installs across all supported environments without requiring separate lockfiles.
| Behavior | Detail |
|---|---|
| Single lockfile | All three workspace packages share one uv.lock |
| Python version coverage | Markers for <3.11, ==3.11.*, ==3.12.*, >=3.13 |
| Platform coverage | Separate markers for darwin x86_64, darwin arm64, linux aarch64, linux x86_64, win32 |
| Updating | uv lock regenerates the lockfile; uv lock --upgrade upgrades all dependencies |
| Installing | uv sync --frozen installs exactly what the lockfile specifies |
Sources:
pytorch-cpuPyTorch is sourced from PyTorch's own wheel index instead of PyPI, using CPU-only builds to reduce image size. The explicit = true flag means only packages explicitly marked with { index = "pytorch-cpu" } in [tool.uv.sources] will use this index.
This globally forces python-pptx to >=1.0.2 across all workspace members, overriding any transitive dependency that might pull in an older version. This is reflected in the lockfile manifest as well.
Sources:
All three packages use Hatchling as the build backend:
Package source directories per build target
The Makefile wraps the build commands:
| Makefile target | Command run |
|---|---|
build_langflow_base | cd src/backend/base && uv build |
build_langflow | uv lock --no-upgrade && uv build |
build_langflow_backup | uv lock && uv build |
Sources:
pyproject.tomlThe root pyproject.toml centralizes all tool configuration for the backend. These sections affect all three workspace packages since they are applied from the workspace root.
| Section | Tool | Key Settings |
|---|---|---|
[tool.ruff] | Ruff linter/formatter | target-version = "py310", line-length = 120, select = ["ALL"] with explicit ignores |
[tool.ruff.lint.per-file-ignores] | Ruff | Per-file rule suppressions for test files, Alembic migrations, CLI files |
[tool.mypy] | Mypy type checker | plugins = ["pydantic.mypy"], ignore_missing_imports = true |
[tool.pytest.ini_options] | pytest | testpaths = ["src/backend/tests", "src/lfx/tests"], asyncio_mode = "auto", timeout = 150 |
[tool.coverage.run] | coverage.py | source = ["src/backend/base/langflow/"], omits Alembic and __init__.py |
[tool.codespell] | codespell | Skips generated files, lock files, node_modules |
Sources:
The frontend is a separate npm workspace located at src/frontend/. It is not part of the uv workspace.
The frontend version is kept in sync with the Python package version. Its dependency lockfile is src/frontend/package-lock.json. For full details on the frontend build process, see Frontend Build Pipeline.
Sources:
The following commands are used for day-to-day workspace management (see Makefile Commands for the full list):
| Operation | Command |
|---|---|
| Install all workspace deps (frozen) | uv sync --frozen |
| Install with PostgreSQL extra | uv sync --frozen --extra postgresql |
| Regenerate lockfile | uv lock |
| Upgrade all deps | uv sync --upgrade |
| Add a runtime dependency | uv add <package> |
| Add a dev dependency to langflow-base | cd src/backend/base && uv add --group dev <package> |
| Build langflow-base wheel | cd src/backend/base && uv build |
| Build langflow wheel | uv lock --no-upgrade && uv build |
Sources:
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.