Skip to main content

Stratum Run allows you to run scripts in various languages on the cloud

Project description

Stratum Run Library for Python3

Overview

Stratum Run is a tool that allows users to quickly execute scripts using in common languages such as Python, Javscript, etc.

Check out https://stratumcloud.io for more information on Stratum.

Python Library

This Python module for Stratum Run allows you to run scripts in an isolated environment, so hackers can't mess with your environment, secrets, or system.

Usage

from stratumrun import StratumRun

# Create a Stratum run instance with your API key
s = StratumRun(key="API KEY")

# Run your command and wait for a response
response = s.run("print(\"hello world\")", language="python3", timeout=30)
print(response.stdout)

# To start a command where you don't need to wait for the response, you can call the start function. Returns a job ID string
job = s.start("time.sleep(10)", language="python3", timeout=11)
print(job)

# To get the response, call the get function with the job ID
import time
time.sleep(15)

response = s.get(job)
print(response.stdout)

The Response Object

The run call returns a Response object with the following fields:

  • stdout
  • stderr
  • duration
  • metrics
  • status

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

stratumrun-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

stratumrun-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file stratumrun-0.1.1.tar.gz.

File metadata

  • Download URL: stratumrun-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for stratumrun-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c722e7dab6e8414d3e331103dca5ec763a7736620b354b9dfe422cc92ab1dfa9
MD5 3f105290693d7df348c8328790b63201
BLAKE2b-256 bdb34dbb3c6e41ec444d151715e602292f8c36cc0caf2a9ef8bf17db5a5aa62e

See more details on using hashes here.

File details

Details for the file stratumrun-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stratumrun-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for stratumrun-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 906729d87cab6d7b06eab78f90ed287b23246383c86272fe8b72f6b45dd2a9af
MD5 c037837c4dd41784ed62c355ccd69510
BLAKE2b-256 52927410768f8c302f34271b63617f6b2ace7f8a30be26bb15266899d3b6b837

See more details on using hashes here.

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