commit dda01f0135cbfd314eecd5674c0860c9e1d95de4 Author: Prits001 Date: Sat Sep 30 23:40:15 2023 +0300 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4d6813e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.venv +__pycache__ +*.db \ No newline at end of file diff --git a/database.py b/database.py new file mode 100644 index 0000000..b4e5337 --- /dev/null +++ b/database.py @@ -0,0 +1,8 @@ +import sqlite3 + +con = sqlite3.connect("data.db") + +cur = con.cursor() + +cur.execute('CREATE TABLE IF NOT EXISTS data_table (key, value)') + diff --git a/main.py b/main.py new file mode 100644 index 0000000..d8145eb --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +from fastapi import FastAPI +import database +app = FastAPI() + + +@app.get("/") +def read_root(): + return {"Hello": "World"} + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..658b842 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +fastapi[all] \ No newline at end of file