Skip to main content

Gives access to client IP information.

Project description

The Unofficial Flask IP Info Extension

This library provides simple access to the client's IP in flask.

from flask import Flask, request
from flask_ip_api import IPInfo

app = Flask(__name__)
IPInfo(app)

@app.route("/")
def index():
  return request.ip["ip"]

if __name__ == "__main__":
  app.run()

Uses the https://ipapi.com/ and https://ipinfo.io/ IP APIs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_ip_api-1.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

flask_ip_api-1.1.1-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page