Metadata-Version: 2.4
Name: hugpy-server
Version: 0.2.0a0
Summary: Hugpy server: the Flask composition root with routes, auth, SSE, API keys and the built web console; wires fleet placement, task plugins and oracle hooks
Author-email: putkoff <support@hugpy.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://hugpy.ai
Project-URL: Documentation, https://github.com/hugpy/hugpy/blob/main/py/services/hugpy_server/README.md
Project-URL: Repository, https://github.com/hugpy/hugpy
Project-URL: Source, https://github.com/hugpy/hugpy/tree/main/py/services/hugpy_server
Project-URL: Issues, https://github.com/hugpy/hugpy/issues
Project-URL: Changelog, https://github.com/hugpy/hugpy/releases
Project-URL: Architecture, https://github.com/hugpy/hugpy/blob/main/PARTITION.md
Keywords: hugpy,llm,self-hosted,openai-compatible,flask,api-server,console
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Environment :: Web Environment
Classifier: Framework :: Flask
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: hugpy-platform
Requires-Dist: hugpy-control
Requires-Dist: hugpy-storage
Requires-Dist: hugpy-engine
Requires-Dist: hugpy-media
Requires-Dist: hugpy-video
Requires-Dist: hugpy-oracle
Requires-Dist: hugpy-fleet
Requires-Dist: hugpy-curation
Requires-Dist: flask>=3
Requires-Dist: werkzeug>=3
Requires-Dist: abstract-flask
Requires-Dist: pydantic>=2
Requires-Dist: requests
Requires-Dist: huggingface_hub
Requires-Dist: gunicorn; sys_platform != "win32"
Requires-Dist: waitress; sys_platform == "win32"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Provides-Extra: discord
Requires-Dist: hugpy-discord; extra == "discord"
Provides-Extra: ops
Requires-Dist: hugpy-ops; extra == "ops"
Dynamic: license-file

# hugpy-server

`hugpy_server` — the Flask composition root of the Hugpy ecosystem, extracted
from `abstract_hugpy_dev`. Ownership and allowed dependencies are declared in
`py/partition.toml`; see `PARTITION.md` at the workspace root.

* `hugpy_server.wsgi_app.create_app()` / `get_hugpy_flask()` build the app:
  every route blueprint, the `/api` dual mounts, the operator/member/video
  gates and the packaged React console (`console_dist/`, see
  `BUILD_CONSOLE.md`).
* `hugpy_server.wiring.install_all()` installs every cross-package seam listed
  in `py/WIRING.md` (fleet placement into the engine, oracle providers, task
  plugins, catalog bridge, oracle video hooks, curation providers, storage
  footprint selector, HF-token listener, control bus, eviction sink). The
  report lands at `app.extensions["hugpy_wiring"]`.
* `hugpy-serve` (`hugpy_server.wsgi_app:main`) serves with gunicorn on POSIX,
  waitress on Windows, and the Flask dev server as the last resort.
* Server-owned state (API keys, video share keys, Discord bindings, install
  links) lives under `hugpy_server.state.server_state_dir()`
  (`HUGPY_SERVER_STATE_DIR`, else the platform's `PROJECTS_HOME`).

Allowed Python dependencies inside the ecosystem: hugpy_platform, hugpy_control,
hugpy_storage, hugpy_engine, hugpy_media, hugpy_video, hugpy_oracle, hugpy_fleet,
hugpy_curation (optional, lazy: hugpy_discord, hugpy_ops).

Tests: `cd py/services/hugpy_server && ../../.venv/bin/python -m pytest -q --timeout=120`
(`tests/integration/` holds the multi-package tests moved from the monolith).
