Giter VIP home page Giter VIP logo

flask-geomapper's Introduction

flask-geomapper

Visualize Flask request locations cartographically.

This python library allows you to map Flask request locations on a map using their IPs. This allows you to get a better understanding of your users and audience.
Example map:

Installation

pip3 install flask-geomapper

Demo

https://flask-geomapper.herokuapp.com (locations cleared periodically). Source can be found at "examples/heroku".

Quickstart

Here is a simple example of flask-geomapper. An explaination can be found in "examples/basic.py".

import flask
from flask_geomapper import flask_geomapper

app = flask.Flask(__name__)
fg = flask_geomapper(app, count_trigger=app.before_request, debug=True) 

@app.route("/")
def show_map():
    return flask.send_file(fg.get_img(), mimetype="image/png")

app.run(debug=True, use_reloader=False)

Examples

Examples can be found in the examples directory.

Basic usage: "basic.py"
AWS S3 integration: "aws_s3.py"
Modifying count triggers: "count_triggers.py"
Database integration: "database_integration.py"
Clear old locations: "remove_first_location_on_interval.py"
Ignore routes and status codes: "ignore_routes_and_statuses.py"
Manually add locations: "manual_history_append.py" Heroku deployment: "heroku/"

Commercial usage

For commercial usage, you must use an API key at members.ip-api.com.

flask-geomapper's People

Contributors

gadhagod avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.