How gitpod-io/gitpod-sdk-python works
Gitpod Python API library is a typed synchronous/asynchronous client for the Gitpod REST API. A caller creates a client, invokes a resource operation, and receives a parsed response; list operations can paginate automatically. The graph preserves major API domains visible in the tree, plus the shared request, response, and pagination layers. Resource implementations beyond the sampled host-token module are not inspected, so their detailed internal call relationships are omitted; documented client usage and sampled request behavior ground the main workflow.
Main entry points: _base_client.py Request engine · _client.py Sync and async clients · _models.py Typed API models · host_authentication_tokens.py Runners and auth
Components 22
Client and requests
- Sync and async clients
src/gitpod/_client.py - Request engine
src/gitpod/_base_client.py - Resource base
src/gitpod/_resource.py - Query encoding
src/gitpod/_qs.py - File uploads
src/gitpod/_files.py - Response handling
src/gitpod/_response.py - Streaming
src/gitpod/_streaming.py - Errors and retries
src/gitpod/_exceptions.py
API resources
- Identity
src/gitpod/resources/identity.py - Environments
src/gitpod/resources/environments/environments.py - Projects
src/gitpod/resources/projects/projects.py - Automations
src/gitpod/resources/automations.py - Organizations
src/gitpod/resources/organizations/organizations.py - Groups
src/gitpod/resources/groups/groups.py - Runners and auth
src/gitpod/resources/runners/configurations/host_authentication_tokens.py - Billing and usage
src/gitpod/resources/billing.py
Types and responses
- Typed API models
src/gitpod/_models.py - Request and response types
src/gitpod/types - Host token types
src/gitpod/types/runners/configurations/host_authentication_token.py
Pagination
- Page iterators
src/gitpod/pagination.py
Other components
- Python application
- Gitpod REST API
Connections 21
- Python application → Sync and async clients: creates and calls
README.md - Sync and async clients → Identity: exposes operation
README.md - Sync and async clients → Request engine: uses requests
- Identity → Gitpod REST API: calls REST API
- Environments → Gitpod REST API: calls REST API
- Projects → Gitpod REST API: calls REST API
- Automations → Gitpod REST API: calls REST API
- Organizations → Gitpod REST API: calls REST API
- Groups → Gitpod REST API: calls REST API
- Runners and auth → Gitpod REST API: posts operations
src/gitpod/resources/runners/configurations/host_authentication_tokens.py - Billing and usage → Gitpod REST API: calls REST API
- Request engine → Response handling: parses response
src/gitpod/_base_client.py - Request engine → Errors and retries: raises API errors
src/gitpod/_base_client.py - Request engine → Streaming: handles streams
src/gitpod/_base_client.py - Request engine → Query encoding: encodes query
src/gitpod/_base_client.py - Request engine → File uploads: sends uploads
src/gitpod/_base_client.py - Response handling → Typed API models: parses into models
- Typed API models → Request and response types: uses generated types
src/gitpod/types/environments/automations/service_retrieve_response.py - Host token types → Typed API models: extends base model
src/gitpod/types/runners/configurations/host_authentication_token_retrieve_response.py - Runners and auth → Page iterators: returns paged results
src/gitpod/resources/runners/configurations/host_authentication_tokens.py - Page iterators → Request engine: fetches next pages