AcqStore Server entry points and packaging¶
Current AcqStore Server¶
Two entry modes share the same API port:
| Mode | Entry | Notes |
|---|---|---|
| API only | python -m acqstore_server → app.main_uvicorn() |
FastAPI + uvicorn; no NiceGUI |
| Native | python -m acqstore_server.desktop → app.main_native() |
NiceGUI status UI + same routes; reload=False, gzip_middleware_factory=None |
uv run python -m acqstore_server
→ acqstore_server/__main__.py
→ multiprocessing.freeze_support()
→ acqstore_server.app.main() # uvicorn unless ACQSTORE_SERVER_NATIVE=1
uv run python -m acqstore_server.desktop
→ acqstore_server/desktop.py
→ freeze_support + main_native()
if __name__ == '__main__': guards are required for freeze/pack.
Native / PyInstaller rules¶
Rules that matter for AcqStore Server native pack:
- Always
freeze_support()under__main__before launching. - Never call
main()/ui.run()from__mp_main__. - Packaged NiceGUI requires
reload=Falsewhen frozen. - Never enable default NiceGUI GZip for this app (binary session GETs).
Verdict¶
- API-only and native desktop entries are both supported.
- Pack with
./packaging/acqstore_server/build_app.sh(includes static demo datas). - Rebuild the
.appafter native UI / gzip / route changes before distributing.