Category : flask

Apologies for the very rudimentary question. I am running a docker container and it’s referenceing a file called site.py which is supposed to display a message on a web page. When I run a curl command, this is the message I get: The view function did not return a valid response. The function either returned ..

Read more

I am trying to fetch rest api from XYZ provider inside python/flask webApp I used this as example/guide https://help.parsehub.com/hc/en-us/articles/217751808-API-Tutorial-How-to-get-run-data-using-Python-Flask I dont have api key but auth token so this is code I am using and returns alldata `from flask import Flask, render_template import requests import json app = Flask(__name__) @app.route(‘/’) def homepage(): headers = { ..

Read more

I am just trying to create a simple database, add a word, print it, then drop it, but I am getting an error message that I can’t make any sense out of. Error message: sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table post has no column named word [SQL: INSERT INTO post (word) VALUES (?)] [parameters: (‘Cheese 0’,)] (Background on ..

Read more

I am trying deploy my flask website following these tutorials Flask + Firebase Flask + Firestore. This is the project, and Dockerfile I have built so far ├── page │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── chromedriver │ │ ├── credentials.json │ │ ├── pages.py │ │ └── token.pickle ..

Read more

I do not know how to show the result of my python code in a specific web page. Here is the code: from flask import Flask, render_template, request, jsonify, make_response import random import time app = Flask(__name__) # Some irrelevant code here… db.append([x, " ".join(heading_parts), " ".join(content_parts)]) @app.route("/") def index(): """ Route to render the ..

Read more