Fleet SDK
The Fleet Python SDK provides programmatic access to Fleet's environment infrastructure.
Installation
Install the Fleet SDK using pip:
pip install fleet-python
Alpha/Pre-release Versions
To install the latest alpha or pre-release version:
pip install --pre fleet-python
To install a specific alpha version:
pip install fleet-python==0.2.64-alpha1
Authentication
Fleet supports browser login for local CLI use and API keys for scripts, services, and CI.
For local CLI use:
flt login
The CLI stores browser-login credentials in ~/.fleet/credentials.json and
sends JWT auth headers scoped to the selected team.
For API-key auth, obtain a key from the Fleet Platform and set:
export FLEET_API_KEY="sk_your_key_here"
When both are present, FLEET_API_KEY takes precedence.
Basic Usage
import fleet
import datetime
# Create environment by key
env = fleet.env.make("fira")
# Reset environment with seed and options
env.reset(
seed=42,
timestamp=int(datetime.datetime.now().timestamp())
)
# Access environment state ('current' is the resource id for a sqlite database)
sql = env.state("sqlite://current")
sql.exec("UPDATE customers SET status = 'active' WHERE id = 123")
# Clean up
env.close()
Environment Management
Creating Instances
# Create environment instance with explicit version
env = fleet.env.make("fira:v1.2.5")
# Create environment instance with default (latest) version
env = fleet.env.make("fira")
Connecting to Existing Instances
# Connect to a running instance
env = fleet.env.get("env_instance_id")
# List all running instances
instances = fleet.env.list_instances()
for instance in instances:
print(f"Instance: {instance.instance_id}")
print(f"Type: {instance.environment_type}")
print(f"Status: {instance.status}")
# Filter instances by status (running, pending, stopped, error)
running_instances = fleet.env.list_instances(status_filter="running")
# List available environment types
available_envs = fleet.env.list_envs()
Metadata
Release files for fleet-python 0.2.133
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fleet_python-0.2.133.tar.gz | 490.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fleet_python-0.2.133-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / fleet_python-0.2.133.tar.gz
| Download URL | fleet_python-0.2.133.tar.gz |
|---|---|
| Size | 490.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a51a67199d14774e7b6227c5cc55490594ca0c990d619c323e6cbbeaf28a0ffb
|
|
BLAKE2b-256 checksum How to use checksums |
615f001f9ff3bdda6b24972c34f9bbbee759892f59f48d9d2a3168e8cc5005b6
|
| 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 Aug 6, 2026.
Transparency logRelease files / fleet_python-0.2.133-py3-none-any.whl
| Download URL | fleet_python-0.2.133-py3-none-any.whl |
|---|---|
| Size | 573.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23aa5b54a81211d186ea6169d92fa660355acae6a06200f559d24aa7f54081fe
|
|
BLAKE2b-256 checksum How to use checksums |
8885ab2b1a27cb9b4c310da6a3085a655989157402bd28580c23d1301a788dd4
|
| 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 Aug 6, 2026.
Transparency log