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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ods_types_py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ods_types_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 116c8db7abc16215d90bf4b9c6e6dcb7475727de4df07245eeff7c7e13fe03f7
MD5 ce9a8d5e2a7df29d1a92d6beef0bc781
BLAKE2b-256 b43e7d585c6a0a057b509f16bbc39c35ceb7622311f13d05652e379d389d4c20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ods_types_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for ods_types_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40e14cdf73699db28cb836b5ea7186c3b3e02dc41a7fe589fb58302430b45de2
MD5 6900886f804e3e071556a979334b6fc8
BLAKE2b-256 6b82be3d122f129fc809546780952faeb06451e087186149538ecc77b166a651

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