Main Sequence Python SDK
The Main Sequence Python SDK is the client and development toolkit for the Main Sequence platform.
The Main Sequence platform allows you to:
- rapidly build and deploy data products with normalized
MetaTablecontracts andTimeIndexTableUpdaterproducer workflows - rapidly deploy RBAC-enabled dashboards on the platform
- rapidly deploy agents using the Google Agent SDK
The key idea is that you can focus on development and deployment, while the platform handles the DevOps layer.
Repository Status
- Status: actively maintained
- Last commit:
2026-03-27-6aa5dea-docs logo fix v.3.17.6 - Open issues: GitHub Issues
- Documentation: Documentation Site
- Security policy: SECURITY.md
- Release history: CHANGELOG.md
- Major-version migrations: Migration guides
What this repository contains
This repository contains the SDK and documentation used to build and operate Main Sequence CodeRepositories.
Main package areas:
mainsequence.meta_tables:MetaTables,TimeIndexTableUpdaters, update workflows, and persistencemainsequence.client: API client models for CodeRepositories, jobs, time-index tables, sharing, and platform resourcesmainsequence.cli: themainsequencecommand-line interface
Repository areas:
docs/: knowledge guides, CLI docs, and generated reference docstests/: automated tests
Documentation map
The documentation is organized into three reading modes:
- Knowledge: deeper conceptual guides
- CLI: command-focused operational documentation
- Reference: generated API reference
Recommended entry points:
- Beginner tutorial:
- Knowledge:
- Migrations:
- CLI:
Quick start
Install the package:
pip install mainsequence
Authenticate:
mainsequence login
An already MCP-authenticated coding agent can establish the same persisted CLI
session with mainsequence login --mcp, then call the printed
auth.cli_authorize tool while the command waits. The backend supplies the
callback URI; tokens return directly to the CLI and are never exposed through
MCP.
Check that you can see your CodeRepositories:
mainsequence code-repository list
Create a new CodeRepository:
mainsequence code-repository create my-first-repository
Set it up locally:
mainsequence code-repository set-up-locally <CODE_REPOSITORY_UID>
cd my-first-repository
mainsequence code-repository build-local-venv --path .
From there, the normal learning path is:
- model your first canonical table with a backend-managed
MetaTable - create your first
TimeIndexTableUpdateras an opinionated MetaTable-backed update workflow - understand sharing and RBAC for published tables
- add an API or another application surface
- schedule jobs
- build dashboards or downstream consumers
- package the CodeRepository as an agent-facing surface when it is ready
Installation for development
This repository uses pyproject.toml and a development dependency group.
With uv:
uv sync --group dev
Or with pip, install the package and the docs/test tools you need separately.
Common development commands
Run the CLI:
mainsequence --help
Run tests:
pytest
Serve the docs locally:
mkdocs serve
Build the docs:
mkdocs build
Lint the code:
ruff check .
Format the code:
black .
How to read this repository
If you are evaluating the platform:
- start with the separate canonical tutorial CodeRepository linked above
If you are building a feature and already know the area:
- go straight to the relevant guide in
docs/knowledge/
If you are operating CodeRepositories day to day:
- use
docs/cli/and themainsequence --helpcommand tree
If you need the exact SDK surface:
- use
docs/reference/
Package metadata
- Package name:
mainsequence - Python:
>=3.13 - CLI entry point:
mainsequence
Package metadata is defined in pyproject.toml.
License
This repository is distributed under the terms described in LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mainsequence-8.0.1.tar.gz.
File metadata
- Download URL: mainsequence-8.0.1.tar.gz
- Upload date:
- Size: 537.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e390c4a7c8d0632dde57b045eed3fc1a65fd85ffe3f47525f1905491191a2c5a
|
|
| MD5 |
1a87bcb6d361bc340ba33c0f291b1bb5
|
|
| BLAKE2b-256 |
ab94561642de33f38cb72a6dbc1dfec71a7aa27938171ab873fe783645845d3c
|
Provenance
The following attestation bundles were made for mainsequence-8.0.1.tar.gz:
Publisher:
publish-to-pypi.yml on mainsequence-sdk/mainsequence-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mainsequence-8.0.1.tar.gz -
Subject digest:
e390c4a7c8d0632dde57b045eed3fc1a65fd85ffe3f47525f1905491191a2c5a - Sigstore transparency entry: 2635209423
- Sigstore integration time:
-
Permalink:
mainsequence-sdk/mainsequence-sdk@cc78ce971a4462f05b597e98bfb98c9254a5ab4b -
Branch / Tag:
refs/tags/v8.0.1 - Owner: https://github.com/mainsequence-sdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@cc78ce971a4462f05b597e98bfb98c9254a5ab4b -
Trigger Event:
push
-
Statement type:
File details
Details for the file mainsequence-8.0.1-py3-none-any.whl.
File metadata
- Download URL: mainsequence-8.0.1-py3-none-any.whl
- Upload date:
- Size: 414.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a44d1e215fff352c810d288c6dd16d761772082ff6fde4142be41ac6894b6597
|
|
| MD5 |
f309daca24e7a7eeef92a643d331e2a6
|
|
| BLAKE2b-256 |
0459b7fe713abc5f75a47f525a6c95a58e6f36b44b54941a4ae19ad9fa8fdd5f
|
Provenance
The following attestation bundles were made for mainsequence-8.0.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on mainsequence-sdk/mainsequence-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mainsequence-8.0.1-py3-none-any.whl -
Subject digest:
a44d1e215fff352c810d288c6dd16d761772082ff6fde4142be41ac6894b6597 - Sigstore transparency entry: 2635209452
- Sigstore integration time:
-
Permalink:
mainsequence-sdk/mainsequence-sdk@cc78ce971a4462f05b597e98bfb98c9254a5ab4b -
Branch / Tag:
refs/tags/v8.0.1 - Owner: https://github.com/mainsequence-sdk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@cc78ce971a4462f05b597e98bfb98c9254a5ab4b -
Trigger Event:
push
-
Statement type: