Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

flask get ip address of request

from flask import request
from flask import jsonify

@app.route("/get_my_ip", methods=["GET"])
def get_my_ip():
    return jsonify({'ip': request.remote_addr}), 200
Comment

PREVIOUS NEXT
Code Example
Python :: python add month datetime 
Python :: numpy array with random numbers 
Python :: adding whitenoise to middleware in django 
Python :: discord py bot status 
Python :: send message to specific channel discord.py 
Python :: python write to command prompt 
Python :: how to limit a command to a permission in discord.py 
Python :: python how to read a xlsx file 
Python :: open image in numpy 
Python :: perfect number in python 
Python :: discord.py intents 
Python :: seaborn axis limits 
Python :: install mamba conda 
Python :: unlimited arguments python 
Python :: write a python program to read last n lines of a file 
Python :: how to save matplotlib figure to png 
Python :: remove help command discord py 
Python :: how to replace a word in csv file using python 
Python :: python check file format 
Python :: Could not find a version that satisfies the requirement psycopg2=2.8 (from pgcli) (from versions: 2.7.5, 2.7.6, 2.7.6.1, 2.7.7) 
Python :: python key down 
Python :: pygame quit 
Python :: opencv get area of contour 
Python :: insertion sort python 
Python :: count nan pandas 
Python :: python split first space 
Python :: file exist python 
Python :: label encoding in pandas 
Python :: how to make computer go in sleep mode using pythn 
Python :: python discord webhook 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =