I made a database on Replit. I'm using Flask and SQLAlchemy. I was wondering whether anyone knows how I can see my database (e.g. on the Console log) because I think I've added the same new user 2 times.
Asked
Active
Viewed 68 times
1 Answers
0
There is no GUI interface for Replit DB
Since Replit DB is treated similarly to a Python dictionary, you should be able to just print the database like so:
# importing database
from replit import db
# assigning some data so that it actually prints something out
db["hello"] = "hello, world!"
# printing the db
print(db)
The result should be the following:
>>> {"hello":"hello, world!"}
Therefore, you can directly use db
when displaying database data.
Like so:
from flask import Flask
from replit import db
app = Flask(__name__)
db["my_num"] = 3
@app.route("/")
def index():
return db
References
If my answer is unclear, please let me know by commenting.

Beedful
- 115
- 2
- 11