Skip to content

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…

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.…

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 ‘curre…

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 temp…

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…