Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

comotion-sdk

comotion-sdk is the python SDK for interacting with the Comotion APIs. Initial support is limited to Dash, but may expand in future.

Documentation

Documentation for this module can be found here.

Contributing

In order to contribute to this project, fork this repo and submit a pull request to this project

In order to set up a local environment, pull this repo and install.

pipenv is used to manage dependencies on this project. in order to use it, ensure that pipenv is installed.

The deployment depends on the pipfile, so ensure that is complete.

pip install --upgrade pip
pip install pipenv

And then enter the virtual environment for this project that will automatically ensure all dependencies are available

pipenv install -e .
pipenv shell

When using nvim with basedpyright, start the editor from inside pipenv shell so the language server inherits the same Python environment. Type checking is configured in pyproject.toml and only covers hand-written code under src/comotion/ and tests/ (generated API clients are excluded).

Adding modules

Ensure dependencies are also added to setup.py in the install_requires section. Then run

pipenv install -e .

Ensure you understand pipenv when [installing new libraries] (https://pipenv.pypa.io/en/latest/install/#installing-packages-for-your-project).

running tests

To run tests

pipenv install --deploy --dev
pipenv run test -v

Building docs

Run the following from the docs directly. Ensure to watch out for warnings. pipenv install --dev pipenv shell make html

Rerunning code generator

We use OpenApi generator to generate the python.

There are two specifications, because the SDK talks to two different APIs:

Spec Generated package API
openapi_generator/comodash_api_swagger.yaml comodash_api_client_lowlevel Main Dash API, https://{org}.api.comodash.io/v2
openapi_generator/comodash_dailyrun_api_swagger.yaml comodash_dailyrun_api_client_lowlevel DailyRun endpoints on the per-organisation frontend API, https://api.{org}.comodash.io/superset

They are generated independently, so regenerating one never touches the other.

The requirements for this are a swagger file that can be gotten from WHERE?

Download latest jar of OpenAPI Generator

java -jar \
  ./openapi_generator/openapi-generator-cli.jar generate \
        -i ./openapi_generator/comodash_api_swagger.yaml\
        -g python \
        --package-name comodash_api_client_lowlevel \
        --additional-properties \
            generateSourceCodeOnly=True,library=urllib3 \
        -o ./src/
java -jar `
  openapi_generator/openapi-generator-cli.jar generate `
        -i openapi_generator/comodash_api_swagger.yaml `
        -g python `
        --package-name comodash_api_client_lowlevel `
        --additional-properties `
            "generateSourceCodeOnly=True,library=urllib3" `
        -o src

We have changed from asyncio to urllib3 to ensure simplicity in coding without requiring "await" and "async"

Regenerating the DailyRun client

The DailyRun client is generated the same way, from its own spec and into its own package. Note the different output directory: both generator runs would otherwise write src/.openapi-generator/FILES, src/.openapi-generator/VERSION and src/.openapi-generator-ignore, and the second run would overwrite the first run's copies of them. Generating into a scratch directory and copying only the package across keeps those shared files intact.

java -jar \
  ./openapi_generator/openapi-generator-cli.jar generate \
        -i ./openapi_generator/comodash_dailyrun_api_swagger.yaml\
        -g python \
        --package-name comodash_dailyrun_api_client_lowlevel \
        --additional-properties \
            generateSourceCodeOnly=True,library=urllib3 \
        -o ./build/dailyrun_gen/

cp -r build/dailyrun_gen/comodash_dailyrun_api_client_lowlevel src/
cp build/dailyrun_gen/comodash_dailyrun_api_client_lowlevel_README.md src/
rm -rf build

If you do not have a Java runtime, the generator also runs from its official Docker image. Pin the version so the output matches the existing clients:

docker run --rm -v "$PWD:/local" openapitools/openapi-generator-cli:v7.12.0 generate \
        -i /local/openapi_generator/comodash_dailyrun_api_swagger.yaml \
        -g python \
        --package-name comodash_dailyrun_api_client_lowlevel \
        --additional-properties generateSourceCodeOnly=True,library=urllib3 \
        -o /local/build/dailyrun_gen/

After regenerating, check that the shared generator metadata is untouched:

git status src/.openapi-generator src/.openapi-generator-ignore

The hand-written comotion.dash.DailyRun class wraps this generated client and holds the behaviour the specification cannot express (scope checks, treating the 409 from start_execution as a normal result, the verify argument and the GetDailyRunExecutionMode enum). It lives in src/comotion/, which src/.openapi-generator-ignore excludes, so regenerating never discards it.

To generate an html of the api:

java -jar \
  ./openapi_generator/openapi-generator-cli.jar generate \
        -i ./openapi_generator/comodash_api_swagger.yaml\
        -g html \
        -o ./html/

Metadata

Release files for comotion-sdk 1.2.2.dev0

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

Source distribution (sdist)

Source distribution for comotion-sdk 1.2.2.dev0
File Size Uploaded
comotion_sdk-1.2.2.dev0.tar.gz 313.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for comotion-sdk 1.2.2.dev0
File Interpreter ABI Platform
comotion_sdk-1.2.2.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 474.3 kB

Release files / comotion_sdk-1.2.2.dev0.tar.gz

Download URL comotion_sdk-1.2.2.dev0.tar.gz
Size 313.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4ffa65c18976ba26187a90363e69ad9df26a29958f02d9a5c7d8eda5f209fc3d
BLAKE2b-256 checksum
How to use checksums
80465fd80490ee6e7afd94151ca4c9f1dd87df7235fd19bbb83f68b2ac010cc6
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 13, 2026.

Transparency log

Release files / comotion_sdk-1.2.2.dev0-py3-none-any.whl

Download URL comotion_sdk-1.2.2.dev0-py3-none-any.whl
Size 161.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c1fce2b9a4870a5d824b298ea1b0482bffe39cf489b1fc4b31ae2e924c9372a
BLAKE2b-256 checksum
How to use checksums
8890d3331a8ac2de699c2a4c37f3b5c03b6fc5381d61c4e0ed51c36974e3beab
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 13, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.2

2 release files

This release

1.2.2.dev0 This release

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.30

2 release files

0.0.29

1 release file

0.0.28

1 release file

0.0.27

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.4

2 release files

0.0.3

2 release files

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