Skip to main content

scitex-template

pypi python docs

tests quality cov License: AGPL v3

SciTeX

uv pip install scitex-template[all] · pip install scitex[template]


Problem and Solution

# Problem Solution
1 Six template repos evolving independently — minimal scitex-* package, research project, cloud-module plugin, pip project, LaTeX manuscript, singularity container One vendored monorepo + clonerpip install scitex-template ships every clone_* function, plus a code-snippet library for scitex idioms (session decorator, io save/load, plt subplots)
2 Cloner code buried in scitex-python — release cadence didn't match the templates' Standalone cloner — independent versioning, lazy umbrella imports, MCP server that exposes the same ops to agents

Installation

pip install scitex-template              # core (lazy imports for scitex.git / scitex.logging / scitex.scholar)
pip install scitex-template[mcp]         # MCP server deps (fastmcp)
pip install scitex-template[dev]         # pytest + coverage

The umbrella route also works — pip install scitex[template] pulls this package transitively.

Demo

# Clone any of the 6 vendored templates into a fresh dir
scitex-template clone scitex-pkg my-new-pkg     # minimal scitex-* package
scitex-template clone research-project paper-2026
scitex-template clone latex-manuscript thesis
scitex-template clone singularity-container apptainer-rig

# List available templates + code snippets
scitex-template list-templates
scitex-template list-snippets
graph LR
    Vendored["scitex_template/templates/<br/>(6 vendored template repos)"] --> Cloner["scitex-template clone"]
    Snippets["scitex_template/snippets/<br/>(session, io, plt, ...)"] --> CLI["scitex-template list/get"]
    Cloner --> Out1["fresh project dir"]
    CLI --> Out2["copy-paste idioms"]

Architecture

scitex_template/
├── templates/                ← 6 vendored template repos (kept in sync)
│   ├── scitex-pkg/           ← minimal scitex-* package skeleton
│   ├── research-project/     ← @stx.session-driven analysis layout
│   ├── cloud-module-plugin/  ← scitex-cloud plugin scaffold
│   ├── pip-project/          ← bare-bones PyPI package
│   ├── latex-manuscript/     ← scitex-writer-compatible paper
│   └── singularity/          ← apptainer container recipe
├── snippets/                 ← copy-paste idioms (session, io, plt, ...)
├── _cli/                     ← `scitex-template clone` / list / get
└── _mcp/                     ← MCP server exposing the same ops to agents

Each template ships as plain files; cloning is a recursive copy with optional {name} substitution, no Cookiecutter-style runtime templating engine. The MCP server re-exports the CLI surface 1:1.

Quick Start

pip install scitex-template
scitex-template list-templates
scitex-template clone research ./my-experiment
from scitex_template import clone_research, get_code_template

clone_research(target="my-experiment", project_name="my-experiment")
print(get_code_template("session"))

3 Interfaces

Python API
import scitex  # noqa: F401 — ensures scitex.git / .logging are importable

from scitex_template import (
    clone_research,
    clone_pip_project,
    clone_scitex_minimal,
    get_available_templates_info,
    get_code_template,
)

# Clone a research project template
clone_research(target="my-experiment", project_name="my-experiment")

# Discover available templates
for info in get_available_templates_info():
    print(f"{info['id']:>10}  {info['description']}")

# Pull a code snippet for a scitex session script
print(get_code_template("session"))

The legacy import path from scitex.template import … also still works via a compatibility shim in scitex-python.

CLI

Entry point: scitex-template (also python -m scitex_template).

scitex-template list-templates             # enumerate templates
scitex-template show-info research         # template metadata
scitex-template clone research ./my-proj   # populate from cache
scitex-template refresh-cache              # force re-clone
MCP Server — for AI Agents

Install with pip install scitex-template[mcp] and the package exposes async handlers (template_list, template_info, template_clone, template_cache_refresh) over MCP — agents can scaffold projects without running Python themselves.

Template repos

scitex-template clones from these external repositories:

Template id Repo
research scitex-research-template
app / pip pip-project-template
cloud-module scitex-template-cloud-module
minimal scitex-minimal-template
singularity singularity_template
paper paper-template

A future revision may vendor these as templates/<id>/ subdirs in this repo so the cloner and the templates ship in lockstep.

Dependency notes

Per the SciTeX downstream dependency rule (general/01_arch_02), this package aims to avoid a hard runtime dep on the scitex umbrella. At present three submodules are still imported lazily inside clone_* functions: scitex.git, scitex.logging, scitex.scholar.ensure_workspace. Once scitex-git is extracted as a standalone, those imports will move to the standalone equivalents (scitex_git, scitex_logging, scitex_scholar). Users running pip install scitex[template] pick up the umbrella transitively, so there is no current breakage.

License

AGPL-3.0-only.

Part of SciTeX

scitex-template is part of SciTeX. Install via the umbrella with pip install scitex[template] to use as scitex.template (Python) or scitex template ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.


SciTeX

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scitex_template-0.7.1.tar.gz (7.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scitex_template-0.7.1-py3-none-any.whl (7.9 MB view details)

Uploaded Python 3

File details

Details for the file scitex_template-0.7.1.tar.gz.

File metadata

  • Download URL: scitex_template-0.7.1.tar.gz
  • Upload date:
  • Size: 7.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for scitex_template-0.7.1.tar.gz
Algorithm Hash digest
SHA256 55096f4c8aca9bcf0becb60182dd0c1b11a96e1d4221baf0323f1e644510bf86
MD5 5a0e91ca6574a24d4b42586fce424cec
BLAKE2b-256 90e3c48011d945873d41ebfa29a3feaffb8c43fb7fe439f307bb585bbbba83bd

See more details on using hashes here.

File details

Details for the file scitex_template-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scitex_template-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57ff22e992bf4c6a2dd8dcbb3a32deaa6c82fe2a811b50c736363b0285c7a3b6
MD5 34a09ea990c72126b1012143ee84c5f1
BLAKE2b-256 072c2617caab32b1e5e0a2adeb07c6644763945fa906b0aee0fb8381c7f99af9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 files

0.7.0

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page