Skip to main content

Mitosis Python SDK

This is the Python client SDK to interact with the Mitosis API. It provides a convenient way to access Mitosis services and manage your resources programmatically.

See the Mitosis documentation and Mitosis repository for more details.

Usage

Install the package with pip

pip install pynetmito

Or if you are using uv, you can add it to your project with:

uv add pynetmito

Now let's see a simple example of how to use the SDK:

from pynetmito import MitoHttpClient
coordinator_addr = "http://127.0.0.1:5000" # The coordinator address of the mitosis backend service
c = MitoHttpClient(coordinator_addr)
c.connect(user="your-user-name", password="your-password")

# Now you can use the client to submit tasks
with open("orig.txt", "w") as f:
    f.write("hello world")
c.upload_attachment(Path("orig.txt"), key="some-remote-text-file/in-object-storage/log.txt")

# Specify the task with attachment
attachment = RemoteResourceDownload(
    remote_file=RemoteResource.attachment("some-remote-text-file/in-object-storage/log.txt"), local_path=Path("test.txt")
)
task_spec = TaskSpec(args=["echo", "$MITO_RESOURCE/test.txt"], resources=[attachment], terminal_output=True)
args = SubmitTaskReq(group_name=c.username, task_spec=task_spec)
r = c.user_submit_task(args) # This will return a SubmitTaskResp object (with uuid to identify the task)
res = c.get_task_by_uuid(r.uuid) # You can use the uuid to get the task status and result
print(res)

# To download the terminal output of the task
c.download_artifact(
    r.uuid,
    content_type=ArtifactContentType.STD_LOG,
    local_path=Path("new.txt"),
)

Mitosis API support table

pynetmito Mitosis
0.2.7 0.6.5 - 0.6.7
0.2.6 0.6.5 - 0.6.6
0.2.5 0.6.5 - 0.6.6
0.2.4 0.6.2 - 0.6.4
0.2.3 0.6.2
0.2.2 0.6.1
0.2.1 0.6.0
0.2.0 0.6.0
0.1.3 0.5.3

Metadata

Release files for pynetmito 0.2.7

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

Source distribution (sdist)

Source distribution for pynetmito 0.2.7
File Size Uploaded Provenance Actions
pynetmito-0.2.7.tar.gz 19.7 kB With provenance Details for pynetmito-0.2.7.tar.gz

Built distribution (wheel)

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

Total release size: 39.6 kB

Release files / pynetmito-0.2.7.tar.gz

Download URL pynetmito-0.2.7.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5cbe7ddd40720a1490fbb6551b7bd36593ef3dc235a01c7f76140d43ab60565f
BLAKE2b-256 checksum
How to use checksums
80f4151ada68d7d8f35915430af65c07bc949e790232e3fa5dba2ae4600b0ff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 20, 2025.

Transparency log

Release files / pynetmito-0.2.7-py3-none-any.whl

Download URL pynetmito-0.2.7-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3108ed474ff268084be770bc92ec1d95fbf9f4f815a8316070927dc7d30e0b3
BLAKE2b-256 checksum
How to use checksums
71ff1a5e25104adba0950589c88b80c90226b064b5521c30edb27a04d7294c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Nov 20, 2025.

Transparency log

Security for pynetmito 0.2.7

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pynetmito-0.2.7.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 Nov 20, 2025.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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