templates/python: init

This commit is contained in:
Infinidoge 2025-01-20 14:44:59 -05:00
parent adc5376072
commit e6e80da7e3
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
7 changed files with 157 additions and 0 deletions

View file

@ -0,0 +1 @@
from .main import run

View file

@ -0,0 +1,27 @@
import logging
import os
import sys
from dotenv import find_dotenv, load_dotenv
# Logger setup
log = logging.getLogger("rename")
log.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s:%(levelname)s:%(name)s: %(message)s")
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(formatter)
log.addHandler(handler)
if load_dotenv(find_dotenv(usecwd=True)):
log.debug("Loaded .env")
else:
log.debug("Didn't find .env")
TOKEN = os.getenv("TOKEN")
def run():
pass