[project]
name = "lfx"
version = "0.4.4"
description = "Langflow Executor - A lightweight CLI tool for executing and serving Langflow AI flows"
readme = "README.md"
authors = [
    { name = "Gabriel Luiz Freitas Almeida", email = "gabriel@langflow.org" }
]
requires-python = ">=3.10,<3.15"
dependencies = [
    "langchain-core>=1.2.28,<2.0.0",
    "pandas>=2.0.0,<3.0.0",
    "pydantic>=2.0.0,<3.0.0",
    "pillow>=11.1.0,<13.0.0",
    "fastapi>=0.135.0,<1.0.0",
    "uvicorn>=0.34.3,<1.0.0",
    "typer>=0.16.0,<1.0.0",
    "platformdirs>=4.3.8,<5.0.0",
    "aiofiles>=24.1.0,<25.0.0",
    "typing-extensions>=4.14.0,<5.0.0",
    "python-dotenv>=1.0.0,<2.0.0",
    "rich>=13.0.0,<14.0.0",
    "httpx[http2]>=0.24.0,<1.0.0",
    "aiofile>=3.8.0,<4.0.0",
    "json-repair>=0.30.3,<1.0.0",
    "docstring-parser>=0.16,<1.0.0",
    "networkx>=3.4.2,<4.0.0",
    "nanoid>=2.0.0,<3.0.0",
    "cachetools>=6.0.0",
    "emoji>=2.14.1,<3.0.0",
    "chardet>=7.3.0",
    "defusedxml>=0.7.1,<1.0.0",
    "passlib>=1.7.4,<2.0.0",
    "pydantic-settings>=2.10.1,<3.0.0",
    "tomli>=2.2.1,<3.0.0",
    "pyyaml>=6.0.0,<7.0.0",
    "orjson>=3.11.6,<4.0.0",
    "asyncer>=0.0.8,<1.0.0",
    "structlog>=25.4.0,<26.0.0",
    "loguru>=0.7.3,<1.0.0",
    "langchain~=1.2.0",
    "langchain-classic~=1.0.7",
    "validators>=0.34.0,<1.0.0",
    "filelock>=3.20.1,<4.0.0",
    "pypdf>=6.10.0,<7.0.0",
    "cryptography>=46.0.7",
    "ag-ui-protocol>=0.1.10",
    "langflow-sdk>=0.1.0",
    "markitdown>=0.1.4,<2.0.0",
    "setuptools>=80.0.0,<81.0.0",
    "wheel>=0.46.2,<1.0.0",
    "mcp>=1.17.0,<2.0.0",
]

[project.scripts]
lfx = "lfx.__main__:main"
lfx-mcp = "lfx.mcp.__main__:main"

[project.entry-points.pytest11]
lfx = "lfx.testing"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["src/lfx"]

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v --tb=short --strict-markers --disable-warnings --color=yes"
markers = [
    "unit: Unit tests",
    "integration: Integration tests",
    "slow: Slow-running tests",
    "asyncio: Async tests",
    "lfx_env_file(path): path to a .env file loaded before this test's flow execution",
    "lfx_timeout(seconds): timeout in seconds for this test's flow execution"
]

[dependency-groups]
dev = [
    "asgi-lifespan>=2.1.0",
    "blockbuster>=1.5.25",
    "coverage>=7.9.2",
    "hypothesis>=6.136.3",
    "pytest>=9.0.3",
    "pytest-asyncio>=0.26.0",
    "pytest-cov>=7.0.0",
    "ruff>=0.9.10",
]
integration = [
    # Dependencies for running Simple Agent and other integration tests
    "langchain-openai>=1.1.12,<2.0.0",
    "langchain-community>=0.4.1,<1.0.0",
    "langchain-mongodb>=0.11.0",
    "langchain-perplexity>=1.0.0,<2.0.0",
    "langchain-qdrant>=1.1.0",
    "langchain-weaviate>=0.0.6",
    "beautifulsoup4>=4.12.0",
    "lxml>=5.0.0",
]

[tool.coverage.run]
branch = true
omit = [
    "*/tests/*",
    "*/__init__.py",
    "*/components/*",  # Third-party integrations tracked separately
    "*/schema/workflow.py",  # Schema definitions don't require test coverage
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "raise AssertionError",
    "raise NotImplementedError",
    "if __name__ == '__main__':",
    "if TYPE_CHECKING:",
    "@abstractmethod",
]
