Base URL

The constants are gwenlake.constants.GWENLAKE_API_URL, GWENLAKE_ATLAS_URL and KNOWN_ENDPOINTS; base_url="atlas" is accepted as a short name. Every resource is served under one gateway, https://api.gwenlake.com/v1. A tenant deployed on its own host, a self-hosted platform or a staging environment is reached by naming its endpoint, in order of precedence: base_url= on the client, the GWENLAKE_BASE_URL environment variable, or the base_url key of the credentials profile in use (see Authentication). An API host serves the API under /v1, an Atlas application host under /api/v1 (https://atlas.gwenlake.com/api/v1); a bare host is completed to https://<host>/v1, a host with /api to /api/v1, any other path (http://localhost:8000/v1) is used as given. The command line’s config set-profile probes a host for the right prefix.

Timeouts and retries

The default timeout is one minute per request. Failed requests are retried twice with an exponential backoff, starting at half a second and capped at eight. Pass timeout= on the client for every call, or on a SQL statement for that call only:

Environment variables

A .env file in the working directory is loaded by the training module and by the command line.

Resources

client.resolve("<project>.<dataset>") turns a handle into a dataset id. Every resource has an async twin on AsyncGwenlake.