-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mathieu <[email protected]>
- Loading branch information
1 parent
f4ae21a
commit 6f352fc
Showing
2 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
flask | ||
jedi | ||
sqlalchemy | ||
mysqlclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): | ||
|