Documentation

esc
    SDKs / Overview

    SDKs

    Official Pantech libraries for Go, Python and JavaScript. They handle keys, retries, idempotency, pagination and waiting for you.

    The SDKs call the public API for you. You write create an instance; they add the headers, retry safely, follow pages and wait for the change to finish.

    LanguageInstallImport
    Gogo get github.com/Pantech-Dynamics/pantech-gogithub.com/Pantech-Dynamics/pantech-go (package pantech)
    Pythonpip install pantechimport pantech
    JavaScript and TypeScriptnpm install @pantechdynamics/sdkimport { Pantech } from "@pantechdynamics/sdk"

    What every SDK does

    • Reads your key from PANTECH_API_KEY. Or pass it in. Make one under API keys.
    • Talks to https://api.pantechdynamics.com/public/v1. Set PANTECH_API_URL, or pass a base URL, to use another.
    • Adds an Idempotency-Key to every change. A fresh UUID per call, reused on each retry, so a retry never does the work twice. Why it matters.
    • Retries what is safe to retry. Network errors and timeouts, 429 (after Retry-After), 500, 502, 503 and 504, up to 3 times with a growing, random wait. The few calls the API does not replay, such as adding or deleting an SSH key, opening an instance console, or a webhook's test, delete, rotate-secret and redeliver, are sent once, and retried only after a 429, which means the API did not run them.
    • Turns errors into one error type with the HTTP status, the stable code, the title, the detail, the request_id and any field errors. Error codes.
    • Follows pages for you. Loop over every item; the SDK follows next_cursor.
    • Waits for changes. operations.wait polls an operation until it finishes, and raises an error if it failed. New machines and databases are waited on through their order.
    • Verifies webhooks. Checks the Pantech-Signature header on a delivery. How.

    Every SDK covers every endpoint in the API reference.

    Which one to use

    Use the language your project already uses. All three do the same things. If you only need a few calls from a shell script, the CLI may be simpler. To let an AI app manage your servers, see Connect your AI.

    Was this page helpful?

    Updated