Skip to content
Guides
Build with Micro

SDKs

Use the official TypeScript, Python, and Go clients.

For method signatures, parameters, and response types, open the TypeScript reference, Python reference, or Go reference.

Official clients wrap the same HTTP API and provide typed methods, error classes, timeouts, and retries.

The examples below pin the releases used to verify these docs: TypeScript 0.14.0, Python 0.8.0, and Go 0.8.0. Upgrade deliberately after reviewing the newer release notes and generated reference.

TypeScript

npm install @micro-so/sdk@0.14.0
import Micro from "@micro-so/sdk";
const client = new Micro({apiKey: process.env.MICRO_API_KEY!, teamID: process.env.MICRO_TEAM_ID!});
const page = await client.prism.objects.contacts.query({query: {select: ["full_name", "email"], limit: 25}});
console.log(page.data);

Python

pip install micro_so==0.8.0
import os
from micro_so import Micro
client = Micro(api_key=os.environ["MICRO_API_KEY"], team_id=os.environ["MICRO_TEAM_ID"])
page = client.prism.objects.contacts.query(query={"select": ["full_name", "email"], "limit": 25})
print(page.data)

Go

go get github.com/micro-so/micro-sdk-go@v0.8.0
package main

import (
  "context"
  "fmt"
  "os"

  "github.com/micro-so/micro-sdk-go"
  "github.com/micro-so/micro-sdk-go/option"
)

func main() {
  client := micro.NewClient(
    option.WithAPIKey(os.Getenv("MICRO_API_KEY")),
    option.WithTeamID(os.Getenv("MICRO_TEAM_ID")),
  )
  page, err := client.Prism.Objects.Contacts.Query(
    context.Background(),
    micro.PrismObjectContactQueryParams{
      Query: micro.F(micro.PrismObjectContactQueryParamsQuery{
        Select: micro.F([]string{"full_name", "email"}),
        Limit: micro.Int(25),
      }),
    },
  )
  if err != nil { panic(err) }
  fmt.Printf("%+v\n", page.Data)
}

The TypeScript client retries connection errors and selected retryable statuses twice by default. Configure retries explicitly when your application needs a single owner for retry policy. Do not bundle secret keys into public browser code; proxy requests through your backend.

On this page

micro.so