Skip to main content

Omnismith API

Project description

Omnismith Python SDK

npm version PyPI version Packagist version Go Report Card

The Omnismith Python SDK is generated from the central OpenAPI contract for the Omnismith platform, a flexible data management system built around templates, entities, and attribute-driven schemas. Use it to automate workflows against the Omnismith API and pair it with the web app at app.omnismith.io.

Quick Start

import os

from omnismith_sdk import ApiClient, Configuration
from omnismith_sdk.api.entity_api import EntityApi
from omnismith_sdk.api.templates_api import TemplatesApi
from omnismith_sdk.models.create_entity_request import CreateEntityRequest

configuration = Configuration(
    host="https://api.omnismith.io/v1",
    access_token=os.environ["OMNISMITH_ACCESS_TOKEN"],
)

with ApiClient(configuration) as api_client:
    templates_api = TemplatesApi(api_client)
    entity_api = EntityApi(api_client)

    template_id = "your-template-id"
    template = templates_api.get_template(template_id)

    entity = entity_api.create_entity(
        create_entity_request=CreateEntityRequest.from_dict(
            {
                "template_id": template.id,
                "attribute_values": [
                    {
                        "attribute_id": template.attribute_ids[0],
                        "value": "SKU-1001",
                    }
                ],
            }
        )
    )

    print(template.name, entity.id)

Set OMNISMITH_ACCESS_TOKEN to an access token created in Omnismith before running the snippet.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnismith_sdk-1.0.8.tar.gz (95.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnismith_sdk-1.0.8-py3-none-any.whl (310.4 kB view details)

Uploaded Python 3

File details

Details for the file omnismith_sdk-1.0.8.tar.gz.

File metadata

  • Download URL: omnismith_sdk-1.0.8.tar.gz
  • Upload date:
  • Size: 95.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for omnismith_sdk-1.0.8.tar.gz
Algorithm Hash digest
SHA256 986d497bbda9ea5ae6f9b8d886631cfa92d34d63f484e2f7bbf8286aec3aac57
MD5 f706bdc191936671b2b3fcb9827ffa60
BLAKE2b-256 59574b862dd0122f5650c7f5ba69a54f9f6539be08176d5002ec075d05574d20

See more details on using hashes here.

File details

Details for the file omnismith_sdk-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: omnismith_sdk-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 310.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for omnismith_sdk-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 ef3f6e5b2294baaf3713f9d34feb833cb3dca88dd8b247876d168d761f0adac3
MD5 203223586768579e8b1c76b8de36e01c
BLAKE2b-256 0327d40b3d5ea8953b9ecf79e28d993cdc266bb14395ae800e26e5e4963770aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page