slingdata-io/sling-cli/sling-python
Claude Code and agent skill by slingdata-io/sling-cli
- community
Checking that the SKILL.md file is still in the repository.
Drive Sling from Python with the `sling` pip package — Sling, Replication, Pipeline and Connection classes, streaming records or DataFrames in/out, and orchestrator integration (Airflow, Dagster, scripts). Use when writing Python code that runs Sling, streams data into or out of Python, or builds replications/pipelines/API specs programmatically.
Install
npx vskill@latest install slingdata-io/sling-cli/sling-pythonSKILL.md
Sling Python Package
The sling pip package wraps the Sling CLI binary (auto-downloaded on first use). It adds Python-only capabilities: streaming records into/out of Python, DataFrame input, and programmatic config building.
Key principle: constructor kwargs mirror the YAML keys exactly. For what the keys mean (modes, options, hooks, selectors), load the concept skill — this skill only covers the Python invocation surface.
| Concept | Skill to load | |
|---|---|---|
| Replication YAML semantics | sling-replications | |
| Pipeline steps / hooks | sling-pipelines | |
| API spec structure | sling-api-specs | |
| Connection setup | CONNECTIONS.md |
Installation
Prefer uv — it's much faster and manages the venv for you:
Plain pip also works: pip install sling / pip install 'sling[arrow]'. The sling binary auto-downloads on first use either way.
| Env Variable | Description | |
|---|---|---|
SLING_BINARY | Path to a specific sling binary (e.g. a local dev build) | |
SLING_PYTHON_USE_SHELL | Run the binary with shell=True (default false) |
Class Overview
| Class | Purpose | |
|---|---|---|
Sling | Single task, mirrors CLI flags; supports input= and .stream() | |
Replication / ReplicationStream | Multi-stream replication (file or built in code) | |
Pipeline | Multi-step workflow (file or built in code) | |
Connection | Test a connection, run SQL (list/dataframe/arrow results) | |
Mode, Format, Compression, MergeStrategy | Enums for config values | |
sling.hooks.Step* / Hook* | Typed pipeline steps and replication hooks |
Sling — single tasks and streaming
Kwargs mirror CLI flags: src_conn, src_stream, src_options, tgt_conn, tgt_object, tgt_options, mode, primary_key, update_key, select, where, limit, offset, range, streams, columns, transforms, cdc_options, stdout, env, debug, trace, replication, pipeline, directory, job, config, home_dir. Python-only: input= for pushing data in.
Input: Python data → target (input=)
Accepts list of dicts, a generator (memory-efficient), pandas or polars DataFrames (types preserved with sling[arrow]):
Output: source → Python (.stream() / .stream_arrow())
Performance caveat: every Sling call spawns the binary and re-opens connections. For many tables in one run, use Replication (one process, one connection, parallel streams) instead of a Sling-per-table loop.
Replication — multi-stream, built dynamically
Helpers: add_streams({...}), enable_streams([...]), disable_streams([...]), set_default_mode(mode).
Pipeline — multi-step workflows
Step classes (aliases of Hook*): StepQuery, StepHTTP, StepCheck, StepRead, StepWrite, StepCopy, StepDelete, StepLog, StepInspect, StepList, StepReplication, StepCommand, StepGroup, StepSet (legacy StepStore), StepRoutine, StepBuild. See the sling-pipelines skill for each step's parameters.
Connection — test and query
return_type:list|dataframe|dataset|arrow(arrow streams, memory-bounded; others materialize fully).limit=Noneapplies the CLI default cap of 100 rows; passlimit=0for no limit. For large results preferSling(...).stream().
ApiSpec — build API specs programmatically
sling.api_spec provides typed builders (ApiSpec, Endpoint, Request, Response, Pagination, Records, Processor, Rule, ...) that validate and serialize to spec YAML:
For spec structure (auth, pagination, processors), load the sling-api-specs skill.
Orchestrators (Airflow, Dagster, etc.)
Call Replication(...).run() or Pipeline(...).run() inside a task. Errors raise SlingError with the CLI output, so normal task retry/alerting applies. Pass per-run values via env= rather than editing YAML files.
Full Documentation
- Package: https://github.com/slingdata-io/sling-python
- Concepts: https://docs.slingdata.io
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcore/sling/assist/skills/sling-python/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/slingdata-io/sling-cli/sling-python)