scitex_hub.project
SciTeX Hub project management.
- Project CRUD (Python API):
from scitex_hub.project import project_list, project_create
projects = project_list() new = project_create(“my-project”, description=”My research”)
# Create as an app project (the agent-programmatic publish flow). app = project_create(“my-tool”, category=”app”) # -> name becomes “my-tool_app” (auto-suffix), is_app=True.
Sandboxed file-operation handlers (async, used by MCP tools) live in
scitex_hub.project._mcp.handlers.
Module Attributes
Top-level project categories. |
|
Suffix appended to app-project names when |
Functions
|
Create a new SciTeX Hub project. |
|
Delete a project by slug. |
List all projects owned by the authenticated user. |
|
|
Rename a project. |
- scitex_hub.project.PROJECT_CATEGORIES: tuple[str, ...] = ('project', 'app')
Top-level project categories. Currently only
"app"adds non-default semantics (setsis_app=Trueserver-side + auto-suffixes the name with_appif missing)."project"is the default research-project shape and adds no extra fields — listed here so the API surface is closed and--categorycan be exhaustively validated CLI-side.
- scitex_hub.project.APP_NAME_SUFFIX = '_app'
Suffix appended to app-project names when
category="app"and the name doesn’t already end with it. Mirrors the operator-12845 directive (“the project NAME likely needs an ‘app’ SUFFIX”).
- scitex_hub.project._apply_app_suffix(name: str) str[source]
Return
namewith_appappended unless already present.The check is suffix-only (not substring) so e.g.
my_app_repostays untouched and onlymy_appround-trips through unchanged.
- scitex_hub.project.project_list() list[dict][source]
List all projects owned by the authenticated user.
- Returns:
List of project dicts with id, name, description, created_at, updated_at.
- scitex_hub.project.project_create(name: str, description: str = '', template: str = 'scitex_minimal', *, category: str = 'project', app_category: str | None = None, request_fn=None) dict[source]
Create a new SciTeX Hub project.
- Parameters:
name – Project name. When
category="app"and the name does not already end with_app, the suffix is appended automatically (operator-12845 convention) before the server call.description – Optional description.
template – Template ID (default: scitex_minimal).
category – Top-level project category. One of
PROJECT_CATEGORIES."app"marks the new project as an app plugin (setsis_app=Trueserver-side) — does NOT submit it to the registry; that’s a separatescitex_hub.appmakerpublishcall.app_category – Optional app sub-category (writing, visualization, data, analysis, reference, utility, other). Only used when
category="app"; ignored otherwise. The sub-category can also be left blank at create time and filled in atapp submittime.request_fn – Optional dependency-injection seam for the HTTP transport. Defaults to the module-level
_make_request(). Tests inject a hand-rolled fake to avoid talking to a live server; production callers leave this argument unset.
- Returns:
Dict with success, project_id, slug, url, is_app, app_category.
- Raises:
ValueError –
categorynot inPROJECT_CATEGORIES.RuntimeError – Server-side rejection (name conflict, validation, etc.).