first commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.venv
|
||||
__pycache__
|
||||
*.db
|
||||
8
database.py
Normal file
8
database.py
Normal file
@ -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)')
|
||||
|
||||
9
main.py
Normal file
9
main.py
Normal file
@ -0,0 +1,9 @@
|
||||
from fastapi import FastAPI
|
||||
import database
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@app.get("/")
|
||||
def read_root():
|
||||
return {"Hello": "World"}
|
||||
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
fastapi[all]
|
||||
Reference in New Issue
Block a user