Skip to content
Advertisement

Tag: flask

Python webhook API

I am trying to create a python webhook to receive data from my ELastic SIEM (JSON format), when I try it I am getting this errors: (sorry It’s my first time using python, so couldn’t know what’s the problem) The webhook configuration: And here is the watcher that I have configured: Could you please help me to solve this error

Python Flask Hosting on Windows 10 IIS server

I Want to Host my Python Rest API on Windows 10 IIS server. First I tried to host a sample application but can not able to that. my_app.py web.config I have tried the below tutorials but it is not working for me. https://medium.com/@rajesh.r6r/deploying-a-python-flask-rest-api-on-iis-d8d9ebf886e9 https://www.youtube.com/watch?v=ma1UvzqF82Q&ab_channel=ShobhitWalia HTTP Error 500.0 – Internal Server Error : see the Error scrennshot I need help…. Thanks

Flask – RuntimeError: Working outside of application context

I am receiving the ‘RuntimeError: Working outside of application context.’ error in my flask application and am struggling to understand why. I have tried to push the app context, however that didn’t seem to work for me and I may just be slightly confused as to how to access the ‘current_app’ so I can write to my logger from other

So my Jinga code is not outputing an option

This is a cs50 pset if you didn’t know. Here is the app.py You can consider that stocks is an array and its not empty The Output is just the first placeholder option and nothing more Answer When you call render_template(), you can pass Python variables to it which makes them available in your Jinja template. Change return render_template(“sell.html”) to

Unable to update database in Stripe webhook

I have a mongodb database tracking if a user has paid through stripe. Once a user pays, I would like to change the database from False to True. However, even though my webhook seems to be working on the Stripe dashboard, the database isn’t updating. Additionally, if I add a print statement it doesn’t print anything. I am using the

Allow for multiple optional arguments in a Flask URL

So I have a flask URL, where there are 2 separate arguments. I want to run the same function with either no arguments, just the first or both. If no specific value is set, I want the unaccounted for arguments to get value None (as opposed to just not existing at all). My current solution involves using 3 @app.route statements,

Advertisement