templates/python: init
This commit is contained in:
parent
adc5376072
commit
e6e80da7e3
7 changed files with 157 additions and 0 deletions
27
templates/python/rename/main.py
Normal file
27
templates/python/rename/main.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue