v0.2.0: Plug-and-play — dual transport (stdio+HTTP), AYON 1.15.4 compat, Dockerfile
- client.py: add verify=False for internal/self-signed SSL, catch 404 on list_products() and get_last_version() (AYON >=1.15 compat) - server.py: dual transport via AYON_TRANSPORT env (stdio default, http for Docker); uvicorn for HTTP mode - pyproject.toml: bump to 0.2.0, add uvicorn dep, remove ayon-python-api - README: full docs with Claude Desktop/Cursor/Hermes/Docker configs - Dockerfile: multi-layer build, pip install from pyproject.toml - .dockerignore: exclude venv, cache, dist
This commit is contained in:
@@ -276,7 +276,14 @@ def main():
|
||||
if not os.environ.get("AYON_KEY"):
|
||||
print("ERROR: AYON_KEY not set", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
app.run()
|
||||
|
||||
transport = os.environ.get("AYON_TRANSPORT", "stdio")
|
||||
if transport == "http":
|
||||
import uvicorn
|
||||
port = int(os.environ.get("PORT", "8000"))
|
||||
uvicorn.run(app.streamable_http_app(), host="0.0.0.0", port=port, log_level="info")
|
||||
else:
|
||||
app.run(transport="stdio")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user