Coverage for src/netflix_open_content_helper/__init__.py: 90%

1"""A helper CLI for Netflix Open Content media."""

2

3 import importlib.metadata

4 import os

5

6 import yaml

7

8 __version__ = importlib.metadata.version(__package__)

9

10 package_dir = os.path.dirname(__file__)

11 config_file = os.path.join(package_dir, "config", "config.yaml")

12

13# Check if the config file exists

14 if not os.path.exists(config_file):

15 raise FileNotFoundError(f"Configuration file not found: {config_file}")

16# Load the configuration file

17 with open(config_file) as file:

18 CONFIG = yaml.safe_load(file)