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 - deploy FastAPI services and supported application surfaces 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 supported application surfaces 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.
Release files for mainsequence 8.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mainsequence-8.1.13.tar.gz | 543.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mainsequence-8.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 956.6 kB
Release files / mainsequence-8.1.13.tar.gz
| Download URL | mainsequence-8.1.13.tar.gz |
|---|---|
| Size | 543.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7393ab9a8852ddcbf46ab5316df45718eae4c3866c657f147fe41f4e53a27a56
|
|
BLAKE2b-256 checksum How to use checksums |
342f330b2792875944747d0739064a8c3ad9f2679ea54ba80edac059879ccab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency logRelease files / mainsequence-8.1.13-py3-none-any.whl
| Download URL | mainsequence-8.1.13-py3-none-any.whl |
|---|---|
| Size | 413.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d90354620ee663c29b62bad41931e58052aa86a620246cec3c206f363ba15671
|
|
BLAKE2b-256 checksum How to use checksums |
2e617ded93c0b2fedcc393a2c5a4919d96ce24bd8b976a9b23736fa083160954
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.
Transparency log