Skip to main content

DataMaker

License: MIT uv Ruff

The official Python library for the Automators DataMaker API.

Installation

You can install the package using pip:

pip install datamaker-py

Quick start

Basic example:

from datamaker import DataMaker, Template

# Create an instance of DataMaker
datamaker = DataMaker()


def main():
    # Define the template
    template = Template(
        name="basic template",
        quantity=2,
        fields=[
            {"name": "first_name", "type": "First Name"},
            {"name": "last_name", "type": "Last Name"},
            {
                "name": "email",
                "type": "Derived",
                "options": {"value": "{{first_name}}.{{last_name}}@automators.com"},
            },
        ],
    )

    # Generate data using the template
    result = datamaker.generate(template)
    print(result)


if __name__ == "__main__":
    main()

Push a set into Tosca Cloud

push_tosca_dataset creates or replaces a native Tosca Cloud data set from a saved set, an input set version, a dataset or inline rows. A Tosca test step reads it with {TDM[<data set>][<subset>][<column>]}.

from datamaker import DataMaker, ToscaDatasetSchemaChangedError

dm = DataMaker()

try:
    result = dm.push_tosca_dataset(
        integration_id,
        name="Orders",
        input_set_id="is_123",        # or set_id=..., dataset_id=..., rows=[...]
        on_existing="overwrite",      # "fail" (default) | "overwrite" | "new" | "append" | "sync"
    )
    print(result.dataset_id, result.rows_count, result.outcome, result.example)
except ToscaDatasetSchemaChangedError as e:
    # The rows dropped a column the data set has. Pass on_schema_change="recreate"
    # to delete and recreate it instead.
    print("removed:", e.removed_columns, "added:", e.added_columns)

For test data that tests use up, push each run's fresh rows with on_existing="append". The rows are added to the one data set, and the rows already there, including those Tosca has marked as used, stay as they are. An append takes up to 1,000 rows and is not deduplicated: if one stops part way, ToscaDatasetAppendIncompleteError.not_appended_rows says which rows to push again.

result = dm.push_tosca_dataset(integration_id, "Orders", rows=new_orders, on_existing="append")
print(result.outcome, result.appended_rows, result.rows_count)  # appended 25 140

An input set gets one Tosca subset per test case by default; subsets_by picks another column or turns it off with False. get_tosca_datasets(integration_id) lists what a space already holds.

Autocomplete Types

This SDK automatically generates TypeScript autocomplete definitions for use in the datamaker application.

The artifact is generated automatically on every push to the main branch and can be fetched from:

https://raw.githubusercontent.com/automators/datamaker-py/main/artifacts/autocomplete-types.ts

See artifacts/README.md for more details.

Development & Contibutions

See the contributing.md guide for details on how to contribute to this project.

Types

Response types are generated from the API's OpenAPI document, not hand-written:

spec/openapi.json  ->  src/datamaker/generated/schema.py  ->  src/datamaker/types.py

Import from datamaker.types, which resolves each spec schema name to the class that really matches it:

from datamaker.types import Project, Plan, Template

projects: list[Project] = dm.get_projects()

They are TypedDicts, so nothing changes at runtime — methods still return the plain dicts response.json() produces, and project["name"] works exactly as before. The types are checker-only.

To regenerate after the API changes:

python scripts/generate_schema.py

CI runs python scripts/generate_schema.py --check and fails if the committed types drift from the spec.

Five schemas cannot currently be generated (SetDetail, DatasetDetail, InputSetDetail, PackInstallListItem, SchemaGraphNavigation): they are composed with allOf, or only appear inside a union, so the generator does not emit them as a named class. Methods returning those keep Dict. The generator script lists them explicitly and fails if the set grows.

Metadata

Release files for datamaker-py 0.12.0

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

Source distribution (sdist)

Source distribution for datamaker-py 0.12.0
File Size Uploaded Provenance Actions
datamaker_py-0.12.0.tar.gz 56.8 kB With provenance Details for datamaker_py-0.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datamaker-py 0.12.0
File Interpreter ABI Platform Actions
datamaker_py-0.12.0-py3-none-any.whl Python 3 none any Details for datamaker_py-0.12.0-py3-none-any.whl

Total release size: 109.2 kB

Release files / datamaker_py-0.12.0.tar.gz

Download URL datamaker_py-0.12.0.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
28766ee0c01590287890c27ce5e65003694c2b9ec35b1c0ad4d6389f77a58d1f
BLAKE2b-256 checksum
How to use checksums
87388abf7f165e0a66f281eb949188b56fb93e6a1fd83c5ff1be230d30d16a9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Release files / datamaker_py-0.12.0-py3-none-any.whl

Download URL datamaker_py-0.12.0-py3-none-any.whl
Size 52.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d67cf548fa1b9291bb846beda57ebc775842af1fafde64ba8646b56e6ce7b162
BLAKE2b-256 checksum
How to use checksums
1b15fe69e8b57ed779a886327270b650dfaf0452941bd7c7fdf85b52003abe93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Security for datamaker-py 0.12.0

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 datamaker_py-0.12.0.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 22, 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.

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