DataWhys API wrapper
Project description
DataWhys Python SDK
DataWhys Python SDK is a Python wrapper for the DataWhys API that handles data orchestration, cloud uploads, and solver execution.
Installation
Use the package manager pip to install.
pip install datawhys-sdk
Usage
import datawhys as dw
from datawhys.datasets import load_titanic
# 1. Set your credentials
dw.api_key = "<YOUR_API_KEY>"
# Optional: Set custom API base
# dw.api_base = "https://your-api-server.com/api/v1"
# 2. Load and Upload your data
# DataWhys uses a cloud-first workflow: upload once, solve many times.
dwf = load_titanic()
dwf.upload()
print(f"File ID: {dwf.file_id}")
# 3. Create a solver and fit the data
solver = dw.Solver()
# Pass the DataWhysFrame directly. The solver extracts the cloud file_id automatically.
solver.fit(
dwf=dwf,
outcome='survived',
target='Died',
features=['sex', 'class', 'age', 'fare']
)
# 4. View results
print(solver.rule)
print('Score:', solver.score)
print('Rule Size:', solver.size)
# Filter the original dataframe using the discovered rule
filtered_df = solver.get_rule_data()
See the SDK Example.ipynb for more in-depth examples and advanced features.
Install from source
git clone https://github.com/datawhys/datawhys-python-sdk.git
cd datawhys-python-sdk
pip install -e .
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Take a look at CONTRIBUTING.md for more info
Please make sure to update tests as appropriate.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datawhys_sdk-0.5.5.tar.gz.
File metadata
- Download URL: datawhys_sdk-0.5.5.tar.gz
- Upload date:
- Size: 184.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b87a9f0494471136cae3ca6a05de2eeb4a11cef0ce3ef55521a7da29917f4cb9
|
|
| MD5 |
d2fc63dbaed2f702b073bce8d5832041
|
|
| BLAKE2b-256 |
ec399575b2abfde9cd5dbfc33b04a77426a22575a6d0eb7d86e4098da294cf48
|
Provenance
The following attestation bundles were made for datawhys_sdk-0.5.5.tar.gz:
Publisher:
publish.yml on datawhys/datawhys-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datawhys_sdk-0.5.5.tar.gz -
Subject digest:
b87a9f0494471136cae3ca6a05de2eeb4a11cef0ce3ef55521a7da29917f4cb9 - Sigstore transparency entry: 2026841964
- Sigstore integration time:
-
Permalink:
datawhys/datawhys-python-sdk@030e3c8007f18f6f34d62b01d7d3a18ad9900cf6 -
Branch / Tag:
refs/tags/v0.5.5 - Owner: https://github.com/datawhys
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@030e3c8007f18f6f34d62b01d7d3a18ad9900cf6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file datawhys_sdk-0.5.5-py3-none-any.whl.
File metadata
- Download URL: datawhys_sdk-0.5.5-py3-none-any.whl
- Upload date:
- Size: 195.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60fca6bf5512d5e7c2a2c56f0579c088d75874b0b37c1127f70beaa3db59d806
|
|
| MD5 |
424204d996a5ac702298871af61fbf5e
|
|
| BLAKE2b-256 |
8580b236f95482494730641fa86767a4c179b1812f840b4df588b38c3a806eb0
|
Provenance
The following attestation bundles were made for datawhys_sdk-0.5.5-py3-none-any.whl:
Publisher:
publish.yml on datawhys/datawhys-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datawhys_sdk-0.5.5-py3-none-any.whl -
Subject digest:
60fca6bf5512d5e7c2a2c56f0579c088d75874b0b37c1127f70beaa3db59d806 - Sigstore transparency entry: 2026842085
- Sigstore integration time:
-
Permalink:
datawhys/datawhys-python-sdk@030e3c8007f18f6f34d62b01d7d3a18ad9900cf6 -
Branch / Tag:
refs/tags/v0.5.5 - Owner: https://github.com/datawhys
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@030e3c8007f18f6f34d62b01d7d3a18ad9900cf6 -
Trigger Event:
push
-
Statement type: