initial save of my chatGPT coding

This commit is contained in:
kalzu
2022-12-17 22:39:21 +02:00
commit 56cd2a3f3f
37 changed files with 1376 additions and 0 deletions

25
data-arbiter-todo Normal file
View File

@ -0,0 +1,25 @@
from flask import Flask
import sqlite3
app = Flask(__name__)
# Create a route for the web server
@app.route('/')
def serve_data():
# Connect to the database
db = sqlite3.connect("btc_timeseries.db")
# Fetch the data from the database
cursor = db.execute("SELECT * FROM timeseries")
data = cursor.fetchall()
# Convert the data to JSON format
data_json = json.dumps(data)
# Return the data as a response to the request
return data_json
if __name__ == '__main__':
# Run the web server
app.run()