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.6.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.6-py3-none-any.whl (309.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omnismith_sdk-1.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 599063fbd01c3f37881f6e726fe61b7817ce7980f87318b1de183bf818172757
MD5 e973e553f5a4f95073cf81bffbd74c7d
BLAKE2b-256 280eadab5d0283e0f0eabeac9f2781877c5d37500af9c0f11ffcf2f8b56f4c51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: omnismith_sdk-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 309.0 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0357ac41f09acc2a3841dc81be4c307ec8bcd34a48f5b962c3246a59b5b8e6bf
MD5 149dd846191756c12a7e8f94bc1d0943
BLAKE2b-256 c49326a1c235542803c11277653ee91fa7acdfbe5d07729d24b3d6b6ba85d029

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