mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-27 04:20:09 +00:00
Add FastAPI registry server that pre-fetches all component data from hanzoai/ui on GitHub, caches in memory, refreshes every 15min. Serves instant cached responses. Deploy at ui.hanzo.ai. - registry/cache.py: eager full-cache with concurrent GitHub fetching - registry/server.py: FastAPI endpoints for components, blocks, search - registry/client.py: RegistryClient matching GitHubAPIClient interface - Dockerfile for containerized deployment - UiTool now uses 3-tier fallback: local disk → registry → GitHub API - Bump hanzo-tools-ui to 0.2.0, server deps optional (fastapi, uvicorn)
16 lines
527 B
Python
16 lines
527 B
Python
"""Hanzo UI Registry — cached component server and client.
|
|
|
|
Server: pre-fetches all component data from hanzoai/ui on GitHub,
|
|
serves cached responses via FastAPI. Deploy at ui.hanzo.ai.
|
|
|
|
Client: fetches from the registry server instead of hitting GitHub
|
|
directly. Used by the UI tool as a middle-tier between local and GitHub.
|
|
"""
|
|
|
|
from .client import RegistryClient
|
|
|
|
__all__ = ["RegistryClient"]
|
|
|
|
# Server imports are deferred to avoid requiring fastapi at import time.
|
|
# Use: from hanzo_tools.ui.registry.server import app
|