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.7.tar.gz (95.5 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.7-py3-none-any.whl (310.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omnismith_sdk-1.0.7.tar.gz
  • Upload date:
  • Size: 95.5 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.7.tar.gz
Algorithm Hash digest
SHA256 68823b7dca8c8d66ec31b5a0ec7037d6db48abc328de51ea093aaa0c839ea70c
MD5 8db7300b329b3752274bbbad3d97555e
BLAKE2b-256 ef98765f9203398767da6d7930c57b119a099100c7c963d7053782944c9682e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: omnismith_sdk-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 39e6bee105bf914d1bc0008fecb7c0ea69d272b8ba35f1cddfb3dd68a294aca0
MD5 273587db2099b3cf0d80d3ddf047de55
BLAKE2b-256 b424da6b2641c222107d708fc9322ddebb14b4820569505470b04617049d51c2

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