Using the JavaScript SDK

The Metorial Python SDK allows you to interact with the Metorial API using Python.

What you will learn

How to install the Metorial Python SDK

How to make requests to the Metorial API using the SDK

Before you begin

References

Install the SDK

To install the Metorial Python SDK, use pip install:

pip install metorial

Using the SDK

To use the SDK, import the Metorial class and create an instance with your API key:

1from metorial import Metorial
2
3metorial = Metorial(
4 api_key="metorial_sk_..."
5)

You can now use the metorial instance to make requests to the Metorial API.

Making Requests

To make a request, use the resource methods on the metorial instance:

1// Get a server by ID
2server = await metorial.servers.get('srv_Rm4Mnheq2bfEPhBhP7SY');
3
4// Update a server instance
5result = metorial.server_implementations.update('svi_Rm4Mnheq2bfEPhBhP7SY', {
6 name: "updated name",
7 description: "updated description"
8});

Using Types

The SDK is typed and includes type definitions for all API resources, so you can benefit from type checking and IntelliSense support: