Skip to main content

Stevesie Python Client.

Project description

Stevesie Python Client

This library is under development, please be careful and report any bugs you find! <3

Installation

This package will be available on PyPi when it's a little more mature, but until then you'll need to download (yes, actually download or clone this repo) and make the ./stevesie folder available to your Python code.

For example, if I want to run the file main.py, I would need to make sure the stevesie folder is in the same directory as main.py, and then we can perform imports like this in main.py: from stevesie.worker import Worker

Usage

This code is currently meant to help you interact with your workers programmatically, either downloading collection results the worker has already gathered in JSON format, or to run workers with special parameters.

from stevesie.worker import Worker

# find your ID from https://stevesie.com/workers/WORKER_ID and insert
worker = Worker(WORKER_ID)

# fetch metadata about the worker, like its task or workflow definition
worker.fetch()

# see what parameters are available to run with
print(worker.run_params())

# download all the workers collection results in-memory
worker_results = worker.fetch_results()

# save the results as JSON locally
worker_results.save_to_file(CACHE_FILE_LOCATION)

# re-load the local JSON back into memory
worker.load_results(CACHE_FILE_LOCATION)

# show the worker extraction results
print(worker_results.items())

# run the worker with custom parameters
worker.run({'PARAM_ID': 'custom_value_from_python'})

Sample Projects

If you build something cool, let us know and we'll link to it here:

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

stevesie-0.0.6.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

stevesie-0.0.6-py2.py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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