Files
Server-scripts/torrent_api/main.py
T

15 lines
375 B
Python
Executable File

#!/home/lucas/scripts/torrent_api/.venv/bin/python
import sys
from pathlib import Path
from dotenv import load_dotenv
from torrent_api.cli import main
if __name__ == "__main__":
working_env = Path.cwd() / ".env"
execution_env = Path(__file__).resolve().parent / ".env"
load_dotenv(working_env if working_env.is_file() else execution_env)
sys.exit(main())