Skip to main content

Core types and enums for ODS (Optikka Design System) - Python implementation

Project description

ods-types-py

Core types and enums for the ODS (Optikka Design System) renderer - Python implementation.

This is the Python equivalent of the @optikka/ods-types npm package, providing shared type definitions and enumerations used across ODS rendering services.

Installation

pip install ods-types-py

Usage

from ods_types import (
    Kind,
    TargetKind,
    AspectMode,
    ScaleMode,
    Box,
    Target,
)

# Use enums
kind = Kind.CANVAS
aspect = AspectMode.CONTAIN

# Use type definitions
box: Box = {"x": 0, "y": 0, "w": 100, "h": 100}
target: Target = {"kind": TargetKind.LAYER, "id": "layer-1"}

Package Contents

Enums

  • Kind - Canvas or layer types
  • TargetKind - Target reference types (canvas, layer, guide, self)
  • AspectMode - Aspect ratio modes (contain, cover, fitWidth, fitHeight)
  • ScaleMode - Scaling modes for images and layers
  • AlignX, AlignY - Alignment options
  • DropZoneMode - Drop zone fit modes
  • StackDir, StackAlign - Stack layout options
  • FadeKind, SlideKind - Animation types
  • Easing - Animation easing functions
  • And more...

Common Types

  • Box - Rectangular region with x, y, w, h
  • Target - Target reference with kind, id, and layerId
  • DrawImageParams - Canvas drawImage parameters

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint
ruff check src/ tests/

License

PROPRIETARY - Optikka

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

ods_types_py-0.1.6.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

ods_types_py-0.1.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file ods_types_py-0.1.6.tar.gz.

File metadata

  • Download URL: ods_types_py-0.1.6.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ods_types_py-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bff4d06cdfd4520546a8c9289626220a9bf0e56b62aa1d70cdfb461d5f1cbfb1
MD5 7c9e7134e04c85f104abcc680a1a203f
BLAKE2b-256 acc4f7afb3781012c1b0a7553a545c7403c7f59ac606e7a5546602b17a660f36

See more details on using hashes here.

Provenance

The following attestation bundles were made for ods_types_py-0.1.6.tar.gz:

Publisher: python-publish.yml on OptikkaCorp/design-models-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ods_types_py-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: ods_types_py-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ods_types_py-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c51809bd7a5074d5ea05652d65bbc356b58d0a81a21e3d2f01aa36e35db6c639
MD5 f612020d1090bc3f5247258ffd5c8320
BLAKE2b-256 a81e4480065a5dad3b5172eb043457bb522c4c1f7fa1d61b749854733b2ed6ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ods_types_py-0.1.6-py3-none-any.whl:

Publisher: python-publish.yml on OptikkaCorp/design-models-package

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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