Skip to content
Back to skills

Python Api Plugins

ASecurity

"Use Snakemake 9.23.1 programmatically with SnakemakeApi,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
devopspythondebuggingapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill python-api-plugins --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Api Plugins?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Api Plugins
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-python-api-plugins/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-python-api-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: python-api-plugins
description: "Use Snakemake 9.23.1 programmatically with SnakemakeApi,
  WorkflowApi, DAGApi, settings dataclasses, and plugin-aware settings."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Python API Plugins

Use this sub-skill when a task embeds Snakemake in Python, translates CLI behavior to API calls, constructs `SnakemakeApi` / `WorkflowApi` / `DAGApi`, passes settings dataclasses, or diagnoses executor, scheduler, storage, logger, or report plugin settings.

## Route by Need

- API lifecycle, settings dataclasses, CLI-to-API mappings, and safe embedding patterns: read [api-reference.md](references/api-reference.md).
- Plugin registry surfaces, settings object shapes, optional plugin imports, and executor/storage/report/logger/scheduler plugin handling: read [plugin-settings.md](references/plugin-settings.md).
- Common API and plugin failures: read [troubleshooting.md](references/troubleshooting.md).
- Safe local API dry-run and DAG/summary probe: run `python scripts/api_dryrun_example.py --help`.

## Fast Pattern

1. Prefer `with SnakemakeApi(output_settings=OutputSettings(...)) as snakemake_api:` so log handlers and workdir changes are cleaned up.
2. Build a `WorkflowApi` with explicit `ResourceSettings(cores=1)` for local dry-runs and a specific `snakefile`/`workdir` when embedding.
3. Build a `DAGApi` via `workflow_api.dag(DAGSettings(...))`, then call non-mutating methods (`printdag()`, `summary()`) or execute through `execute_workflow(executor="dryrun", execution_settings=ExecutionSettings(...))`.
4. Pass plugin settings as plugin-specific settings objects, not arbitrary dicts, and validate by letting the plugin registry raise a clear API error.
5. Do not add `--reason` when translating CLI examples; Snakemake 9.23.1 does not accept that flag, though dry-run output includes reasons.

## Boundaries

- Route ordinary CLI commands, profiles, targets, cores/jobs, scheduler flags, and dry-run recipes to `../execution-cli/SKILL.md`.
- Route storage-provider installation, deployment methods, conda/container behavior, archives, and source deployment to `../deployment-storage/SKILL.md`.
- Route config files, sample sheets, schemas, PEPs, and data-driven inputs to `../configuration-data/SKILL.md`.
- Route Snakefile syntax, rules, wildcards, modules, checkpoints, scripts, and wrappers to `../workflow-authoring/SKILL.md`.
- Route linting/report/test/debug artifact interpretation to `../debugging-reporting/SKILL.md` unless the user specifically needs the API method call.

Files in this skill

  • SKILL.md2.5 KB
  • references/api-reference.md8.2 KB
  • references/plugin-settings.md6.8 KB
  • references/troubleshooting.md6.2 KB
  • scripts/api_dryrun_example.py4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.