Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shuffle_sdk-0.0.7.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shuffle_sdk-0.0.7-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

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

Hashes for shuffle_sdk-0.0.7.tar.gz
Algorithm Hash digest
SHA256 4e8c69c3219ec2a1b39975bbd05f094ea3920fab60a46cc657e92f123f45ba4e
MD5 eace2834f96a72c3245ebc2cf4006fd7
BLAKE2b-256 3006d8834cf96f06e756d25ac82abc33ec69ca9a600057040fecb82576f07858

See more details on using hashes here.

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

Hashes for shuffle_sdk-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 19dc2dec8c1eae16e114b00def605b4ccdb61993a4da1b0d3e9e30bb73d90106
MD5 b1922b7245e940df1e54734e5b1b7688
BLAKE2b-256 a9d9dd162cfbfb0bdeaa7ff23466991a2d042cc2573448746fc22e73881a89d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page