Skip to content

Commit decaf80

Browse files
committed
feat: add basic client SDK for core APIs
0 parents  commit decaf80

File tree

10 files changed

+928
-0
lines changed

10 files changed

+928
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# Virtual environments
10+
.venv
11+
tmp/
12+
uv.lock

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
# Ruff version.
4+
rev: v0.12.11
5+
hooks:
6+
# Run the linter.
7+
# - id: ruff-check
8+
# Run the formatter.
9+
- id: ruff-format

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Mitosis Python SDK
2+
3+
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.
4+
5+
See the [Mitosis documentation](https://docs.stack.rs/mitosis) and [Mitosis repository](https://github.com/stack-rs/mitosis) for more details.
6+
7+
Use `uv add pynetmito` to add this package to your project.

pyproject.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[project]
2+
name = "pynetmito"
3+
description = "Python Client SDK for mitosis"
4+
readme = "README.md"
5+
authors = [{ name = "BobAnkh", email = "[email protected]" }]
6+
requires-python = ">=3.10"
7+
dependencies = ["httpx>=0.28.1", "platformdirs>=4.4.0", "pydantic>=2.11.7"]
8+
license = { text = "Apache-2.0" }
9+
keywords = [
10+
"SDK",
11+
"Client",
12+
"API",
13+
"Async",
14+
"HTTP",
15+
"REST",
16+
"mitosis",
17+
"Distributed",
18+
"evaluation",
19+
]
20+
classifiers = [
21+
"Development Status :: 3 - Alpha",
22+
"Environment :: Web Environment",
23+
"Framework :: AsyncIO",
24+
"Intended Audience :: Developers",
25+
"Intended Audience :: Science/Research",
26+
"License :: OSI Approved :: Apache Software License",
27+
"Operating System :: OS Independent",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3 :: Only",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
34+
"Topic :: Internet :: WWW/HTTP",
35+
"Topic :: Software Development :: Libraries :: Python Modules",
36+
"Topic :: System :: Distributed Computing",
37+
"Topic :: Utilities",
38+
]
39+
dynamic = ["version"]
40+
41+
[build-system]
42+
requires = ["hatchling", "uv-dynamic-versioning"]
43+
build-backend = "hatchling.build"
44+
45+
[project.urls]
46+
Documentation = "https://docs.stack.rs/mitosis/"
47+
Homepage = "https://github.com/stack-rs/mitosis"
48+
Source = "https://github.com/stack-rs/mitosis"
49+
50+
[tool.hatch.version]
51+
source = "uv-dynamic-versioning"
52+
53+
[tool.hatch.build.targets.sdist]
54+
include = ["/httpx", "/README.md"]
55+
56+
[tool.uv-dynamic-versioning]
57+
vcs = "git"
58+
style = "pep440"
59+
bump = true
60+
61+
[tool.hatch.build.targets.wheel]
62+
packages = ["src/pynetmito"]

src/pynetmito/__init__.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
from .types import BaseAPIModel
2+
from .client import MitoHttpClient
3+
from .schemas import (
4+
UserLoginArgs,
5+
UserLoginReq,
6+
UserLoginResp,
7+
TaskState,
8+
ArtifactContentType,
9+
AttachmentContentType,
10+
TaskExecState,
11+
TaskResultMessage,
12+
RemoteResource,
13+
RemoteResourceDownload,
14+
RemoteResourceDownloadResp,
15+
TaskResultSpec,
16+
TasksQueryReq,
17+
TaskQueryInfo,
18+
ParsedTaskQueryInfo,
19+
TaskQueryResp,
20+
ArtifactQueryResp,
21+
TasksQueryResp,
22+
SubmitTaskReq,
23+
SubmitTaskResp,
24+
UploadArtifactReq,
25+
UploadArtifactResp,
26+
UploadAttachmentReq,
27+
UploadAttachmentResp,
28+
AttachmentMetadata,
29+
)
30+
31+
__all__ = [
32+
"BaseAPIModel",
33+
"MitoHttpClient",
34+
"UserLoginArgs",
35+
"UserLoginReq",
36+
"UserLoginResp",
37+
"TaskState",
38+
"ArtifactContentType",
39+
"AttachmentContentType",
40+
"TaskExecState",
41+
"TaskResultMessage",
42+
"RemoteResource",
43+
"RemoteResourceDownload",
44+
"RemoteResourceDownloadResp",
45+
"TaskResultSpec",
46+
"TasksQueryReq",
47+
"TaskQueryInfo",
48+
"ParsedTaskQueryInfo",
49+
"TaskQueryResp",
50+
"ArtifactQueryResp",
51+
"TasksQueryResp",
52+
"SubmitTaskReq",
53+
"SubmitTaskResp",
54+
"UploadArtifactReq",
55+
"UploadArtifactResp",
56+
"UploadAttachmentReq",
57+
"UploadAttachmentResp",
58+
"AttachmentMetadata",
59+
]

0 commit comments

Comments
 (0)