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

flask client ip

from flask import request

@app.route("/route")
def get_my_ip():
    ip = request.remote_addr
    ...
Comment

PREVIOUS NEXT
Code Example
Python :: python project ideas 
Python :: how to empty a text file in python 
Python :: django make migrations 
Python :: avatar discord.py 
Python :: how to create a file in a specific location in python 
Python :: how to move the pointer on screen using python 
Python :: saving a pandas dataframe as a csv 
Python :: one hot encoding python pandas 
Python :: matplotlib set number of decimal places 
Python :: tf.contrib.layers.xavier_initializer() tf2 
Python :: python class tostring 
Python :: python your mom 
Python :: code for making an exe file for python 
Python :: from time import sleep, time 
Python :: decision tree gridsearchcv 
Python :: backwards loop over list in python 
Python :: make beep python 
Python :: create directory in python 
Python :: drop multiple columns in python 
Python :: how to move a column in pandas dataframe 
Python :: trump 
Python :: comparing file content in python 
Python :: python pandas replace nan with null 
Python :: python deepcopy 
Python :: freq count in python 
Python :: nested dict to df 
Python :: what is the purpose of the judiciary 
Python :: python udp receive 
Python :: python datetime to utc 
Python :: telethon invite to group 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =