File: __init__.py

package info (click to toggle)
pysmartthings 3.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,268 kB
  • sloc: python: 8,394; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Asynchronous Python client for SmartThings."""

from pathlib import Path
from typing import Any

import orjson


def load_fixture(filename: str) -> str:
    """Load a fixture."""
    path = Path(__package__) / "fixtures" / filename
    return path.read_text(encoding="utf-8")


def load_json_fixture(filename: str) -> Any:
    """Load a JSON fixture."""
    return orjson.loads(load_fixture(filename))  # pylint: disable=no-member