Spade SDK
Project description
Spade SDK
Spade SDK provides basic classes to implement Spade Files and Processes. For more information about Spade, please visit Spade
It has no dependencies on other Python libraries, and allows development for Spade without a need to install the full Spade app.
Installation
pip install spadesdk
Optional Dependencies
For file validation functionality, install with the pandera extra:
pip install spadesdk[pandera]
Usage
All core classes are available directly from the top-level package:
from spadesdk import Executor, Process, RunResult, File, FileProcessor, FileUpload, HistoryProvider, User
Basic objects
FileProcessor
FileProcessor processes the file uploaded by the user in the Spade app.
File Validation
The FileProcessor class includes a static validate method that can validate file
data against a schema using the Pandera library. This method validates DataFrame data
against a Frictionless schema defined in the File object.
Requirements:
- The
spadesdk[pandera]package must be installed (available as an optional dependency) - A valid Frictionless schema must be defined in Spade
# Validate DataFrame against the schema
FileProcessor.validate(file, dataframe)
Note: If Pandera is not installed, calling the validate method will raise an ImportError. If file.schema is None, a ValueError is raised.
Executor
Executor executes a Spade process, either by directly running Python code or by
calling an external service.
HistoryProvider
HistoryProvider provides the history of a Spade from if the actual process is executed
by an external service. If the process is executed in Spade, a HistoryProvider is not
needed.
Note: The get_runs() method receives a request parameter that is expected to be
a Django HTTP request object. HistoryProvider implementations are therefore coupled to
Django.
Releasing
Releases are published to PyPI automatically via GitHub Actions when a version tag is pushed:
git tag 0.5.0
git push origin 0.5.0
The workflow builds a wheel and sdist with uv build, then publishes using OIDC trusted publishing (no API token needed). Requires a pypi environment configured in the GitHub repository settings.
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 spadesdk-0.5.0.tar.gz.
File metadata
- Download URL: spadesdk-0.5.0.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74077dc702c3a6f019ece753b76f3d81edad5923ca86dcce5ef9169dbef469e6
|
|
| MD5 |
0e13f146a849b167b15bee9a9119a4aa
|
|
| BLAKE2b-256 |
cc7031b63f4a02846ac3c6dc10d3cf5e0312c86b834857c970472ad6d55eb2d2
|
Provenance
The following attestation bundles were made for spadesdk-0.5.0.tar.gz:
Publisher:
release.yml on crugroup/spadesdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spadesdk-0.5.0.tar.gz -
Subject digest:
74077dc702c3a6f019ece753b76f3d81edad5923ca86dcce5ef9169dbef469e6 - Sigstore transparency entry: 1546973371
- Sigstore integration time:
-
Permalink:
crugroup/spadesdk@4cf9db2fcedd195129a9a0ea944788815399b0e8 -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/crugroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4cf9db2fcedd195129a9a0ea944788815399b0e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spadesdk-0.5.0-py3-none-any.whl.
File metadata
- Download URL: spadesdk-0.5.0-py3-none-any.whl
- Upload date:
- Size: 29.7 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 |
621e69f2ed0281ddeaa82dc5e0f677bb9ac7cb87dae1c83d31f0a0a742a0d3af
|
|
| MD5 |
795a8ef04adc847dc7b58014004e5208
|
|
| BLAKE2b-256 |
c5aca4943e037fb15ea7eb318a7dc1d14b3ea5360c204c99f443114249938058
|
Provenance
The following attestation bundles were made for spadesdk-0.5.0-py3-none-any.whl:
Publisher:
release.yml on crugroup/spadesdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spadesdk-0.5.0-py3-none-any.whl -
Subject digest:
621e69f2ed0281ddeaa82dc5e0f677bb9ac7cb87dae1c83d31f0a0a742a0d3af - Sigstore transparency entry: 1546973396
- Sigstore integration time:
-
Permalink:
crugroup/spadesdk@4cf9db2fcedd195129a9a0ea944788815399b0e8 -
Branch / Tag:
refs/tags/0.5.0 - Owner: https://github.com/crugroup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4cf9db2fcedd195129a9a0ea944788815399b0e8 -
Trigger Event:
push
-
Statement type: