Soda Python Libraries
This page describes how to install the Soda Python packages, which are required for running Soda scans via the CLI or Python API.
Installation
Requirements
To use Soda, you must have installed the following on your system.
Python 3.9, 3.10, 3.11, or 3.12. To check your existing version, use the CLI command:
python --versionorpython3 --version. If you have not already installed Python, consider usingpyenvto manage multiple versions of Python in your environment.
While Python 3.12 is the highest officially supported version, there are no known constraints preventing use of Python 3.13+.
Pip 21.0 or greater. To check your existing version, use the CLI command:
pip --versionA Soda Cloud account; see how to sign up.
Best practice dictates that you install the Soda CLI using a virtual environment. If you haven't yet, in your command-line interface tool, create a virtual environment in the .venv directory using the commands below. Depending on your version of Python, you may need to replace python with python3 in the first command (or with the Python version you want your virtual environment to run, e.g. py -3.11).
python -m venv .venv
source .venv/bin/activateChoose an installation flow
Before you install the Soda CLI, decide which installation flow applies to your environment and license type. The two flows available serve different purposes:
Executing data contracts with basic data quality checks on enterprise data sources.
Use this installation method if you’re just getting started.
The Public PyPI index hosts Soda Core packages for all supported data sources.
Same as above, plus: group by checks, reconciliation checks, migrating checks from v3 to v4, running checks on Oracle data, and capturing failed rows with the Diagnostics Warehouse.
Private PyPI repositories are region-specific and require authentication using your API key credentials. This method ensures secure access to licensed components, enterprise-only extensions, and region-compliant hosting.
How to differentiate between free open-source Soda, and paid licensed Soda?
Soda V3: package names included core if the package was free open-source. E.g.:
soda-core-postgres(free open-source)soda-postgres(paid licensed Soda).
Soda V4: no differentiation using core in package names. Differentiation will be based on the installation flows listed above.
Public PyPI installation flow
To use the open source Soda Core python packages, you must install them from the public Soda PyPi registry: https://pypi.cloud.soda.io/simple .
Install the Soda Core package for your data source. This gives you access to all the basic CLI functionality for working with contracts.
Replace soda-postgres with the appropriate package for your data source. See the Data source reference for Soda Core for supported packages and configurations.
Now you can connect to Soda Cloud.
Supported packages
soda: "umbrella" package (does not include Diagnostics Warehouse)Data-source-specific packages: naming pattern is
soda-<datasource>(e.g.soda-postgres,soda-bigquery,soda-sparkdf, etc.)
Private PyPI installation flow
If you wish to use commercial extensions to the Soda Core python package, you must install them from one of the private Soda PyPi registries below. The private PyPI installation process adds an authentication layer and region-based repositories for license-based access control of Team and Enterprise customers.
Upgrade
pipinside your new virtual environment.
Choose the correct repository based on your license and region.
1 Team: Any license except "Trial" or "Enterprise" (see below)
2 Enterprise: one of enterprise , enterprise_user_based , dataset_standard , premier licenses.
Set your credentials.
See how to generate your own API key values.
Based on your license and region, choose and execute one of the following commands, replacing
soda>=4with the package that you need to install.
soda: required for the contract generator (includes Diagnostics Warehouse)soda-groupbysoda-migrationsoda-reconciliationsoda-oracle
Available extensions
The extensions you need to install depend on the features you want to use and your Soda subscription plan. The table below lists the supported features, the required extension for each one, and which plans include access.
Oracle connector
soda-oracle
Enterprise only
Dremio connector
soda-dremio
Enterprise only
You are not logged in to Soda and are viewing the default public documentation. Learn more about Documentation access & licensing.
Last updated
Was this helpful?
