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

10 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-07 20:27 -0700

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

2 

3import importlib.metadata 

4import os 

5 

6import yaml 

7 

8__version__ = importlib.metadata.version(__package__) 

9 

10package_dir = os.path.dirname(__file__) 

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

12 

13# Check if the config file exists 

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

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

16# Load the configuration file 

17with open(config_file) as file: 

18 CONFIG = yaml.safe_load(file)