Buckets:

download
raw
2.41 kB
"""hof-engine: Full-stack Python + React framework."""
from __future__ import annotations
from hof.config import Config
from hof.core.registry import registry
from hof.core.types import types
from hof.cron.scheduler import cron
from hof.db.table import Column, ForeignKey, Table
from hof.errors import HofError
from hof.flows.flow import Flow
from hof.flows.human import human_node
from hof.flows.node import node
from hof.functions import function
from hof.logging_config import configure_logging
from hof.scaffold import get_project_files
def __getattr__(name: str):
"""Lazy HofApp so importing ``hof`` does not force-load ``hof.app`` first.
Avoids rare circular-import / reload races where ``hof.app`` is still
initializing when something does ``from hof.app import HofApp``.
"""
if name == "HofApp":
from hof.app import HofApp as _HofApp
return _HofApp
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
def register_router(router, *, prefix: str = "", tags=None) -> None:
"""Mount a user-defined FastAPI router into the auto-generated app.
Re-exported from :mod:`hof.api.extensions` for convenience. Call at
module import time (most naturally inside a ``functions/*.py`` shim,
which is imported during discovery). See the module docstring there
for the full contract.
"""
from hof.api.extensions import register_router as _register
_register(router, prefix=prefix, tags=tags)
def emit_computation_event(channel_id: str, event: dict) -> None:
"""Emit a progress event to an SSE channel.
Lazy-imports to avoid pulling in FastAPI at module load.
"""
from hof.api.routes.sse import emit_computation_event as _emit
_emit(channel_id, event)
def publish_computation_event(channel_id: str, event: dict) -> None:
"""Publish an SSE event via Redis pub/sub (for cross-process callers like Celery workers)."""
from hof.api.routes.sse import publish_computation_event as _publish
_publish(channel_id, event)
__version__ = "0.1.60"
__all__ = [
"HofApp",
"Config",
"configure_logging",
"Table",
"Column",
"ForeignKey",
"Flow",
"node",
"human_node",
"function",
"register_router",
"cron",
"types",
"registry",
"HofError",
"emit_computation_event",
"publish_computation_event",
"get_project_files",
]

Xet Storage Details

Size:
2.41 kB
·
Xet hash:
6e474b68200d77d3e40ca8597ab5c82548c8949648a7d8f75e8fc248125a40d8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.