The SDK used for Shuffle
Project description
Shuffle SDK
This is the SDK used for app development, testing and production of ALL apps in Shuffle. Works with manual runs, Docker, k8s, cloud serverless.
Released under Python pip for usage outside of Shuffle
Python apps: https://github.com/shuffle/python-apps All apps: https://shuffler.io/search
Usage with Shuffle
Refer to the Shuffle App Creation docs
Build
docker build . -t shuffle/shuffle:app_sdk
Download
pip install shuffle_sdk
Usage
from shuffle_sdk import AppBase
class Example(AppBase):
def __init__(self):
pass
def sample_function(self, paramname):
return f"Hello {paramname}"
if __name__ == "__main__":
Example.run()
Testing the SDK
python3 app.py --standalone --action=sample_function paramname=World
Example with Liquid and the Shuffle Tools app and the "repeat back to me" function
python3 app.py --standalone --action=repeat_back_to_me --call=lol
If successful, the output of the function will show in your CLI.
Adding new Liquid filters
Add a function along these lines:
@shuffle_filters.register
def md5(a):
a = str(a)
return hashlib.md5(a.encode('utf-8')).hexdigest()
This can be used as {{ "string" | md5 }}, where "string" -> the a parameter of the function
Project details
Release history Release notifications | RSS feed
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 shuffle_sdk-0.0.7.tar.gz.
File metadata
- Download URL: shuffle_sdk-0.0.7.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e8c69c3219ec2a1b39975bbd05f094ea3920fab60a46cc657e92f123f45ba4e
|
|
| MD5 |
eace2834f96a72c3245ebc2cf4006fd7
|
|
| BLAKE2b-256 |
3006d8834cf96f06e756d25ac82abc33ec69ca9a600057040fecb82576f07858
|
File details
Details for the file shuffle_sdk-0.0.7-py3-none-any.whl.
File metadata
- Download URL: shuffle_sdk-0.0.7-py3-none-any.whl
- Upload date:
- Size: 43.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19dc2dec8c1eae16e114b00def605b4ccdb61993a4da1b0d3e9e30bb73d90106
|
|
| MD5 |
b1922b7245e940df1e54734e5b1b7688
|
|
| BLAKE2b-256 |
a9d9dd162cfbfb0bdeaa7ff23466991a2d042cc2573448746fc22e73881a89d0
|