Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu <[email protected]>
  • Loading branch information
mathieu-brl committed Nov 27, 2024
1 parent f4ae21a commit 6f352fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
flask
jedi
sqlalchemy
mysqlclient
27 changes: 14 additions & 13 deletions server/server.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/usr/bin/env python

from flask import Flask, jsonify, request
from sqlalchemy import create_engine, text, Table, select, MetaData, inspect, Column
import time

app = Flask(__name__)

services = []

class Service:
def __init__(self, name):
self.__name = name
services.append(self)

def getName(self):
return self.__name
def setName(self, name):
self.__name = name
engine = create_engine('mysql://root:[email protected]:3305/area', echo=False)
connection = engine.connect()
metadata = MetaData()
insp = inspect(engine)
print(insp.get_table_names())
users = Table('users', metadata)

query = select([users])
#print(query)

@app.route("/user")
def users():
return

@app.route("/about.json")
def about():
Expand Down

0 comments on commit 6f352fc

Please sign in to comment.