Registry / data / sling
library1.5.20pypypi✓ verified 84d ago

Sling is a modern ELT (Extract, Load, Transform) data movement tool that allows users to rapidly move data between various databases, data warehouses, and cloud services using a simple Python API or CLI. It supports a wide range of connectors and focuses on ease of use and high performance. The current version is 1.5.15, with a rapid release cadence (multiple updates per month).

pip install sling
INSTALL
IMPORT
SIG · SLING
S
sling
datapythonv1.5.20
Install
1.6s avg
Import
4105ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.20 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 4.211s · 18MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 1.6s · import 3.999s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connection
from sling import Connection
from sling.connections import Connection
All core components are exposed directly from the top-level 'sling' package.
Source
from sling import Source
Source definition for data ingestion.
Target
from sling import Target
Target definition for data destination.
run
from sling import run
from sling.jobs import run
The 'run' function for executing a data sling job is exposed directly from 'sling'.

This quickstart demonstrates how to define a PostgreSQL source and a Snowflake target, then execute a data movement job. It uses environment variables for sensitive connection details, which is a recommended practice. Ensure you have the necessary `sling` extras installed (e.g., `sling[postgres,snowflake]`) and your environment variables configured for a successful run.

import os from sling import Connection, Source, Target, run # Configure connections using environment variables for sensitive data # For a real run, ensure these environment variables are set: # SLING_PG_HOST, SLING_PG_USER, SLING_PG_PASS, SLING_PG_DB # SLING_SNF_ACCOUNT, SLING_SNF_USER, SLING_SNF_PASS, SLING_SNF_DB, SLING_SNF_WAREHOUSE postgres_conn = Connection( name='my_postgres', type='postgres', host=os.environ.get('SLING_PG_HOST', 'localhost'), port=5432, user=os.environ.get('SLING_PG_USER', 'user'), password=os.environ.get('SLING_PG_PASS', 'password'), database=os.environ.get('SLING_PG_DB', 'source_db') ) snowflake_conn = Connection( name='my_snowflake', type='snowflake', account=os.environ.get('SLING_SNF_ACCOUNT', 'your_account'), user=os.environ.get('SLING_SNF_USER', 'user'), password=os.environ.get('SLING_SNF_PASS', 'password'), database=os.environ.get('SLING_SNF_DB', 'target_db'), warehouse=os.environ.get('SLING_SNF_WAREHOUSE', 'COMPUTE_WH') ) # Define source and target for a simple table copy source_table = Source( connection=postgres_conn, object='public.my_source_table' ) target_table = Target( connection=snowflake_conn, object='public.my_target_table', mode='full_refresh' # or 'append', 'incremental' ) # Run the data sling job try: result = run(source_table, target_table) print(f"Sling job completed. Rows replicated: {result.rows_replicated}") except Exception as e: print(f"Sling job failed: {e}") # Example of retrieving connection by name if already added to a global registry (e.g., via CLI or config file) # connection = Connection.get_connection('my_postgres')
sling --version
Debug
Known issues
gotchaConnection parameters vary significantly by connection type. Ensure you consult the documentation for the specific source/target connector (e.g., PostgreSQL, Snowflake, S3) to provide all required and optional parameters.
fix
Refer to the official Sling documentation for each specific connector's required `Connection` parameters and their expected types/formats. Common errors include missing `host`, `port`, `account`, or `schema` fields.
affects: All versions
gotchaSling provides both a Python library for programmatic use and a CLI tool. While `sling run` works for both, the CLI allows managing connections and sources via configuration files, which is separate from Python API's direct object instantiation.
fix
Decide whether to manage Sling connections and jobs programmatically in Python or via the CLI's configuration files. If using the Python API, instantiate `Connection` objects directly. If using the CLI, define connections and jobs in `~/.sling/connections.yaml` or similar configuration files.
affects: All versions
gotchaSchema inference might not always perfectly match complex data types or custom schemas. Sometimes, manual schema mapping or data type casting is required.
fix
For complex cases, use the `stream_config` parameter on `Source` or `Target` to specify explicit data type mappings (`schema_mapping`) or transformation logic. Test with a subset of data to validate schema and data integrity before full runs.
affects: All versions
Errors
Common errors & fixes
sling.exceptions.SlingConnectionException: Failed to connect to database: fe_sendauth: no password supplied
Incorrect or missing authentication credentials (user, password) for the database connection.
fix
Verify that the `user` and `password` parameters in your `Connection` object are correct and match the database server's requirements. Ensure environment variables (if used) are properly set and accessible.
ModuleNotFoundError: No module named 'sling.connections'
Attempting to import submodules directly instead of the top-level package. All core classes and functions are exposed directly under the `sling` package.
fix
Change your import statement from `from sling.connections import Connection` (or similar for other components) to `from sling import Connection` (or `from sling import Source, Target, run`).
KeyError: 'SomeEnvVar'
Attempting to access an environment variable directly via `os.environ['KEY']` which is not set, instead of using `os.environ.get('KEY', default_value)`.
fix
Use `os.environ.get('KEY', '')` or `os.environ.get('KEY', None)` to safely retrieve environment variables and provide a default value or handle the `None` case, preventing the `KeyError`.
Upgrade
Version history
1.5.20latest on PyPI · released Jun 7, 2026
Audit
Dependencies
pyyamlrequiredUsed for configuration parsing.
requestsrequiredUsed for HTTP API interactions, critical for many connectors.
Agent activity
52 hits · last 30 days
node
45
OpenAI (training)
1
Resources
sling — pip install sling · libregistry