Skip to main content

ip whitelisting security package

Project description

Check Whitelisted IP

This is a simple security package to check whether client IP is allowed to access the flask`s backend APIs.

Setup

from flask import Flask
from security.check_ip import IPCheck

# Initialize the Flask app
app = Flask(__name__)

# import IP_list from the config file or declare it here

ip_list = <>

"""Set up IPCheck, there is no need to pass third argument which is "logging_enabled"
By default it is set to false, but if you want to see the incoming request IP then make it true, and it will
be printed in the log

optional
----------
IPBlock(app, ip_list, logging_enabled=True)
"""

ipcheck= IPBlock(app, ip_list)

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

quotient-security-check-0.0.1.dev1.tar.gz (4.2 kB view hashes)

Uploaded Source

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