create_engine()
This commit is contained in:
parent
6198feeb6f
commit
0272dffbbf
19
main.py
19
main.py
@ -0,0 +1,19 @@
|
|||||||
|
import configparser
|
||||||
|
from imaplib import IMAP4
|
||||||
|
|
||||||
|
from sqlalchemy import create_engine
|
||||||
|
|
||||||
|
|
||||||
|
config = configparser.ConfigParser().read('config.ini')
|
||||||
|
db = create_engine(f"postgresql://{config['db']['username']}:{config['db']['password']}@{config['db']['host']}/{config['db']['database']}")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
try:
|
||||||
|
main()
|
||||||
|
except (KeyboardInterrupt, EOFError):
|
||||||
|
pass
|
Loading…
x
Reference in New Issue
Block a user