I have a github repo which is a flask application(website) which is currently running on a SQLalchemy database. There is another github repo that obtains information of the health of a machine (e.g temperatures, status, battery) in the form of a dictionary and this data is not saved anywhere, it is just printed in the ..
I’ve got a system that runs a PostgreSQL database, and uses Flask with SQLAlchemy to interact with it. A number of the queries are failing, and because SQLAlchemy automatically starts transactions behind the scenes, we’re getting a lot of PostgreSQL processes locked up in idle in transaction (aborted) status. Now, I know that the proper ..
I am creating a REST API for an existing legacy database. I am using Flask with flask_restful and flask_sqlalchemy. flask_sqlalchemy has a nice way of creating db.Model classes for tables and then using those to execute queries, but it has no official way of executing stored procedures with parameters, only in "ugly" way of calling ..
Good Day, I have a Flask application where i am using Flask-SQLALchemy and flask script to manage my db. when I do the debug mode I am using postman It works fine without an issue and when I tried to use swagger, It has raised an error The sqlalchemy extension was not registered to the ..
If I have a list of posts, which have created and updated dates with a default attached onupdate callback. Sometimes I need to flag the post, for inappropriate reports or similar actions. I do not want the created and updated dates to be modified. How can I skip the defined onupdate, while making an update ..
Struggling a bit with the below. I have a simple HTML page with 3 Forms, User, Startdate and EndDate. The code is as follows : <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>date picker</title> </head> <body> <h1>Make A Short URL</h1> <form action="/" method="post"> <label for="name">Enter Your Name</label> <input type="text" name="name" value="" required> <label for="date1">Enter date ..
I really don’t have a clue of what is going on that i can’t filter this query, tried filter_by() and filter() both return the same error, it is probably a stupid mistake that i’m failing to notice, your help would be really appreciated. The MariaDB(MySQL) table structure is +————–+————–+——+—–+———+—————-+ | Field | Type | Null ..
I have developed a Flask application, and so far I have only ever deployed it using a single worker. The app connects to an SQLite DB using Flask-SQLAlchemy. In the beginning, I check if my DB already has data, and if not, I initialize some data like a default setup user like this: root_user = ..
In factory boy it is possible to create a sqlalchemy object with a relationship to another table. There is a common recipe for Choosing from a populated table which is made for django, and I want to do this now for flask. So I’d think that I have use this line. user = factory.Iterator(User.query.all()) But ..
I have a flask app that connects with mysql using salalchemy. A strange error happens on DB query. `Traceback (most recent call last): File "/home/faisal/Desktop/work/nesting-app/env/lib/python3.8/site-packages/sqlalchemy/util/_collections.py", line 1008, in call return self.registry[key] KeyError: <greenlet.greenlet object at 0x7f22a0936a90 (otid=0x7f22a08ef100) current active started main> During handling of the above exception, another exception occurred: Traceback (most recent call last): ..