Typing & Metadata
Sieve allows you to type the inputs and outputs of functions deployed to the platform. Most of the pre-built functions have their input and output types listed on their API Guide page.
Function Typing
Sieve jobs can be run in 2 ways — via the API or the Python client. Some Python types may not be JSON-encodable and thus will not be supported by the API. For that reason, we limit the types supported out of the box to:
- All Python primitives (
str
,int
,float
,bool
,dict
,list
) - Sieve types (see SDK reference)
sieve.File
: a generic file object, used to pass references through Sieve functions
Types allow Sieve to render auto-generated UIs that can be used to run these functions via the dashboard. You may also include Sphinx docs with each function to show descriptions with each of your inputs.
Here’s an example of a typed function with a description for the input:
Calling this function can be done in a few ways:
You may also view this function in the dashboard and upload files for the sieve.File
input directly, making it easy to share with others on your team.
Metadata
Sieve also lets you add other metadata including a description, README, and more. This is particularly useful for functions that you want to share with others or make public. Here’s a quick example:
For more information on any of these features and more, check out our Sieve function SDK reference here.
Was this page helpful?