Skip to main content

# OpenDevelop Python wrapper

## Installation Installation of the OpenDevelop Python wrapper can be done using pip.

pip install opendevelop

## Usage

### Initiate client Initiates the OpenDevelop client. It gets 3 optional parameters;

  • host = os.getenv(‘OPENDEVELOP_HOST’)

  • client_id = os.getenv(‘OPENDEVELOP_CLIENT_ID’)

  • client_secret = os.getenv(‘OPENDEVELOP_CLIENT_SECRET’)

    from opendevelop import OpenDevelop client = OpenDevelop()

### Get available images Returns a Python list with the available images for the current OpenDevelop installation

images = client.images()

#### Example response

[u’base’]

### Create a sandbox Creates a sandbox and executes the given commands inside it. It returns the slug of the sandbox is Python string format.

sandbox_slug = client.create_sandbox(image=’base’, cmd=’ls -l ‘)

#### Example response

u’19cc2425738661a6’

### Create a sandbox with some files inside Creates a sandbox, uploads the files, that correspond to the given absolute file paths, to it and executes the given commands inside it. It returns the slug of the sandbox is Python string format.

sandbox_slug = client.create_sandbox(image=’base’, cmd=’python hello.py’, files=[‘/home/user/Desktop/hello.py’])

#### Example response

u’a4eb0e47e8e51724’

### Get status and logs of a sandbox Returns information about the sandbox identified by the given slug. Returns the data in Python dict format.

data = client.sandbox(sandbox_log)

#### Example response
{u’cmd’: u’[“python hello.py”]’,

u’image’: u’base’, u’logs’: u’Hello OpenDevelop!n’, u’return_code’: 0, u’status’: u’terminated’}

Metadata

Release files for OpenDevelop 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OpenDevelop 0.2
File Size Uploaded
OpenDevelop-0.2.tar.gz 3.4 kB Details

Release files / OpenDevelop-0.2.tar.gz

Download URL OpenDevelop-0.2.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2bf174e0343b72a48efb3b22cba0a52a425053561f92784841c299ebd810da34
BLAKE2b-256 checksum
How to use checksums
e19f1c66340957ccd6e0f96e69efff947f7ecb28ffe55238a5584026d8238de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page