Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

3.5 KB
Raw Blame
[project]
name = "flowsint-core"
version = "1.2.11"
description = "Core utilities and base classes for flowsint modules"
authors = [{ name = "dextmorgn", email = "[email protected]" }]
requires-python = ">=3.12,<4.0"
dependencies = [
    "flowsint-enrichers",
    "pydantic[email]>=2.11.7,<3.0.0",
    "neo4j>=5.0,<6.0",
    "sqlalchemy>=2.0,<3.0",
    "psycopg2-binary>=2.9,<3.0",
    "asyncpg>=0.30,<0.31",
    "redis>=5.0,<6.0",
    "celery>=5.3,<6.0",
    "python-dotenv>=1.0,<2.0",
    "pyyaml>=6.0,<7.0",
    "requests>=2.31,<3.0",
    "httpx>=0.28,<0.29",
    "networkx>=2.6.3,<3.0.0",
    "passlib[bcrypt]>=1.7,<2.0",
    "bcrypt>=4.0.0,<5.0.0",
    "python-jose[cryptography]>=3.3,<4.0",
    "sse-starlette>=1.8,<2.0",
    "alembic==1.13.0",
    "phonenumbers>=9.0.8,<10.0.0",
    "python-multipart>=0.0.27,<0.1.0",
    "docker>=7.1.0,<8.0.0",
    "pytest>=9.0.3,<10.0.0",
    "cryptography>=48.0.1,<49.0.0",
    "openpyxl>=3.1,<4.0",
    "mistralai>=1.9.3,<2.0.0",
    "openai>=2,<3",
]

[dependency-groups]
dev = [
    "pytest-asyncio>=0.21,<2.0",
    "pytest-httpx>=0.36,<1.0",
    "ruff>=0.16,<1.0",
    "mypy>=1.17,<2.0",
    "factory-boy>=3.3,<4.0",
]

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

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

[tool.uv.sources]
flowsint-enrichers = { workspace = true }

[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
# The 4 workspace packages import each other across package boundaries
# (flowsint_core, flowsint_types, flowsint_enrichers, app) constantly,
# and none of them ship a py.typed marker, so mypy treats every such
# import as untyped and everything it touches collapses to Any — not a
# per-file bug, a workspace-wide gap. Adding py.typed markers is the
# real fix but is its own project: doing it mid-ratchet here unmasked
# the full ~2200-error pre-existing backlog instead of the ratchet's
# intended "just what this branch touches" (tried it, reverted — see
# git history). Disabling the code is honest about that gap rather than
# failing every PR that imports across packages, which is nearly all of
# them; local logic within each file is still fully checked.
disable_error_code = ["import-untyped"]
# Without this, mypy doesn't understand Field()'s required/optional
# semantics and flags every pydantic model construction that omits a
# field with a default as a "missing named argument" false positive.
plugins = ["pydantic.mypy"]

# Test fixtures (MockEnricher etc.) use the same InputType/OutputType
# class-attribute pattern real enrichers do — see the matching override
# and its rationale in flowsint-enrichers/pyproject.toml. assignment:
# reassigning InputType/OutputType to a concrete type at the class level
# (the pattern itself) trips it, since the base declares them as
# NotImplemented. override: scan()/postprocess() signatures are meant to
# vary per subclass by design (real params/types keyed off InputType/
# OutputType), same as flowsint_enrichers.* below.
#
# disallow_untyped_defs off for tests: pytest fixture params carry types
# from conftest.py fixtures scattered across the tree, not the function
# signature — fully annotating every test function's fixture params for
# marginal safety on non-public test code isn't worth the churn. src/
# stays strict; this is a deliberate, scoped relaxation, not a blanket one.
[[tool.mypy.overrides]]
module = "tests.*"
disable_error_code = [
    "valid-type",
    "attr-defined",
    "name-defined",
    "assignment",
    "override",
]
disallow_untyped_defs = false