Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Main Sequence Logo

Main Sequence Python SDK

Docs Open Issues Last Commit Maintained

The Main Sequence Python SDK is the client and development toolkit for the Main Sequence platform. It provides authentication, typed platform resources, CodeRepository development and release operations, Agent and A2A workflows, jobs, access policies, observability, logging, tracing, and reusable scaffold tooling.

MetaTables is now an independent domain package, installed as mainsequence-metatable and imported as metatables. Table models, time-index table updates, SQLAlchemy schemas, local database interfaces, and Alembic execution are no longer implemented by this distribution.

Repository Status

What This Repository Contains

Main package areas:

  • mainsequence.client: API client models for users, CodeRepositories, jobs, Agents, artifacts, constants, secrets, access policies, releases, and other platform resources
  • mainsequence.cli: the complete mainsequence command-line interface for authentication, platform resources, and local CodeRepository operations
  • mainsequence.instrumentation and mainsequence.logconf: SDK tracing and logging integration
  • mainsequence.server: server-side caller assertion verification
  • mainsequence.scaffold_skills: reusable, version-pinned skill copying for this SDK and extension libraries

Repository areas:

  • agent_scaffold/skills/: version-matched SDK guidance and domain skills; repository-owned AGENTS.md files are never scaffolded or updated
  • docs/: knowledge guides, CLI docs, architecture decisions, and generated reference docs
  • tests/: offline tests plus explicitly marked live-backend tests

Documentation Map

Recommended entry points:

The beginner tutorial is maintained in the separate MainSequence SDK tutorial CodeRepository.

Quick Start

Install and authenticate:

pip install mainsequence
mainsequence login
mainsequence doctor

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.

Inspect and create CodeRepositories:

mainsequence code-repository search
mainsequence code-repository create my-first-repository
mainsequence code-repository set-up-locally <CODE_REPOSITORY_UID>
cd my-first-repository
mainsequence code-repository build-local-venv --path .

Use mainsequence --help and mainsequence code-repository --help for the installed command surface. The CLI includes Agent and AgentSession, CodeRepository, jobs and runs, images, resources and releases, constants, secrets, teams, access policies, scaffold, Docker, and local-development commands.

Python Client

mainsequence.client provides AuthLoaders, MainSequenceClient, generic request and response helpers, and typed platform adapters. The platform owns authorization and lifecycle policy. The SDK resolves CodeRepository source identity from the current Git checkout when an operation requires that context.

Discover deployments with ResourceRelease.filter(name=...) or resolve a known release UID with ResourceRelease.get(pk=...). For shared deployments owned by another repository, use the explicitly scoped filter_admin path. See Resource releases for supported filters and examples.

The standard mainsequence installation includes PyJWT and cryptography for the framework-independent caller assertion verifier. Applications remain responsible for resource authorization and storage operations.

Install mainsequence-metatable and import metatables for table-domain work. See the MetaTables migration guide for the install step, old and new imports, retired table CLI commands, and the legacy SDK option.

Development

This repository requires Python 3.13 or newer and uses pyproject.toml with a development dependency group.

uv sync --group dev
pytest
ruff check .
mkdocs build --strict

Live-backend tests are marked live and excluded from a normal test run. Run them explicitly with pytest -m live when credentials and a target backend are available.

Package metadata is defined in pyproject.toml. This repository is licensed under the MIT License; see LICENSE.

Metadata

Release files for mainsequence 9.0.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for mainsequence 9.0.30
File Size Uploaded Provenance
mainsequence-9.0.30.tar.gz 398.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mainsequence 9.0.30
File Interpreter ABI Platform
mainsequence-9.0.30-py3-none-any.whl Python 3 none any Details

Total release size: 714.0 kB

Release files / mainsequence-9.0.30.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL mainsequence-9.0.30.tar.gz
Size 398.0 kB
Tags Source
SHA-256 checksum
How to use checksums
50e5dfacf33bcd0dfbfb44249498e4107dbf3591cb5a1337d547a79ad771a710
BLAKE2b-256 checksum
How to use checksums
d725e63fa76b7cea1a9f10056e71f6aa0fdd294493dd673f8a5383b5a6faae8f
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 Oct 19, 2026.

Transparency log

Release files / mainsequence-9.0.30-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL mainsequence-9.0.30-py3-none-any.whl
Size 316.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32c94c68725fa1dccf5db713be71afe041478d0c799f4f8f67c7e93f172c302c
BLAKE2b-256 checksum
How to use checksums
cc43142c4910c13370fb21d2c4417307f63c14574af0f2b0478ab24517b1e01e
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 Oct 19, 2026.

Transparency log

Security for mainsequence 9.0.30

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.

Change of provenance

The configuration that created this release differs from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Configuration

  • Removed 9.0.30.dev74 publish-dev-to-pypi.yml
  • Added 9.0.30 publish-to-pypi.yml
Select from 2 files

Attestation for mainsequence-9.0.30.tar.gz

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 Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page