Skip to content

Connecting with an SDK

Each SDK’s client speaks gRPC to an EvidentSource server. Pointing one at the Sandbox is a matter of the address.

  • gRPC: https://sandbox.evidentsource.com:50051
  • No authentication is required on the public Sandbox.

Keep the https://. The Sandbox serves gRPC over TLS, and every SDK chooses TLS from the address’s scheme: an address without https:// connects in plaintext, and fails against the Sandbox. Use http://localhost:50051 for a server on your machine.

use evidentsource_client::EvidentSource;
let es = EvidentSource::connect_to_server("https://sandbox.evidentsource.com:50051").await?;

The crate is evidentsource-client.

import client "github.com/evidentsystems/evidentsource-sdks/go/packages/evidentsource-client"
es, err := client.ConnectSimple(ctx, "https://sandbox.evidentsource.com:50051")
import { EvidentSource } from "@evidentsource/client";
const es = EvidentSource.connect("https://sandbox.evidentsource.com:50051");
from evidentsource_client import EvidentSource
es = await EvidentSource.connect("https://sandbox.evidentsource.com:50051")

The package is evidentsource-client.

using EvidentSource.Client;
var es = await EvidentSourceClient.ConnectAsync("https://sandbox.evidentsource.com:50051");

A client opens a connection to each database it uses. From a connection you run State Changes, and read State Views and events.

In Rust, Go, TypeScript and .NET, a connection follows the database’s revision as it advances. A Python connection doesn’t: ask it for the latest database when you need a current revision. The SDK repository’s examples show the whole flow in each language: see Set up the TodoMVC example.

The same clients connect to your own servers: change the address, and send a bearer token. See Security.