In this guide we’ll create a custom Riza runtime environment with access to the Markdown Python package which converts Markdown into HTML. After building this runtime, any Python code you send to Riza can import markdown.

Create a custom runtime

  1. In the Riza dashboard, go to the Custom Runtimes page.

  2. Click + Create runtime.

  3. On the Create custom runtime page, pick a name for your runtime.

  • For Name, you may only use lowercase letters, numbers, and dashes.
  1. Click Create custom runtime.

Pick your packages

After creating your runtime, you’ll pick which packages to install.

  1. Click Edit from the custom runtime page.

  2. List the packages you want to make available to your runtime in the pip freeze format.

  • To install the Markdown package, use Markdown==3.6.
  1. Click Update runtime. This creates a runtime revision with status Pending followed by Building while the build completes.

  2. If all goes well, the runtime revision status moves to Succeeded.

Use your custom runtime

Now that your custom runtime is built, it’s time to use it. Your runtime identifier is a string that includes your organization name, project name, runtime name and revision ID.

For example, it should look like acme/demos/markdown@02J45CXZVGAB7J517PV2F28NP2.

Pass that identifier as the runtime parameter to the execute API endpoint.