semvec/pypi-packages huggingface dataset:
ip2geo 0.4
Get geolocation from IP address or hostname
License: MIT
Keywords: ip geo geolocation ip-api.com freegeoip.net ipinfo.io coding.tools

|Downloads|

ip2geo
======

Get geolocation information from IP address or hostname. Uses: 'ip-api.com',
'freegeoip.net', 'ipinfo.io' or 'coding.tools'. Can also do a local lookup using
`DB-IP.com <https://db-ip.com/>`_ `IP to City Lite <https://db-ip.com/db/download/ip-to-city-lite>`_ MMDB Database.

Simple example::

    $ ip2geo 8.8.8.8
    8.8.8.8 - United States (US), California (CA), Mountain View - Google

Local lookup::

    $ ip2geo 8.8.8.8 -d dbip-city-lite.mmdb
    8.8.8.8 - United States (US), New Jersey, Newark

Please note the following:

- http://ip-api.com/ (default) has a 45 requests per minute restriction

The script by default will sleep 1.5s between each request when doing multiple
lookups using an input file. This is done to comply to the restrictions on
'ip-api.com'. The sleep time can be changed using the '-s' switch.


Notes
=====

- Works on Python 2 and Python 3
- Uses only Python standard library for remote lookup


Install
=======

Install using pip::

    pip install ip2geo

or

Download and set executable permission on the script file::

    chmod +x ip2geo.py

or

Download and run using the python interpreter::

    python ip2geo.py

For local lookup the maxminddb module is needed::

    pip install maxminddb


Usage
=====

::

    Usage: ip2geo.py [ip|hostname] [options]

    get geolocation from IP address or hostname, can use: 'ip-api.com',
    'freegeoip.net', 'ipinfo.io', 'coding.tools' or 'db-ip.com' ip to city lite
    database for local lookup

    Options:
        --version         show program's version number and exit
        -h, --help        show this help message and exit
        -g API            geolocation api to use: 'ipapi', 'freegeoip', 'ipinfo' or
                          'coding'(default: ipapi)
        -s SLEEP          time to sleep between http requests (default: 1.5)
        -t TIMEOUT        timeout in seconds to wait for reply (default: 5)
        -d DATABASE_FILE  local lookup using db-ip.com ip to city lite database
                          mmdb: https://db-ip.com/db/download/ip-to-city-lite, the
                          maxminddb module must be installed:
                          https://github.com/maxmind/MaxMind-DB-Reader-python
        -i INPUT_FILE     use ips/hostnames from input file (one ip/hostname per
                          line)
        -o OUTPUT_FILE    save geolocation information to file


Examples
========

Get geolocation from IP or hostname::

    $ ip2geo google.com

Get geolocation using 'coding.tools' api::

    $ ip2geo google.com -g coding

Uses an input file containing multiple ips/hostnames (one per line)::

    $ ip2geo -i ips.txt

Save output to file::

    $ ip2geo -i ips.txt -o geo_info.txt


.. |Downloads| image:: https://pepy.tech/badge/ip2geo
flaskmogrify 0.0.16
Flaskmogrify, a simple Flask single pageapplication to convert (w/ Ajax) user-pasted text using an arbitrary text conversion function.
License: MIT
Keywords: flask convert text transform ajax single page application

# flaskmogrify
Flask single page application to display converted text using an arbitrary 
user-supplied function of form  f(input:str)->str.  
AJAX with non-javascript fallback.

- Free software: MIT
- Python3

## Development Setup

1. `git clone https://github.com/danyul/flaskmogrify.git && cd flaskmogrify`
1. `python3 -m venv venv`
1. `venv/bin/pip install -e .[dev]`

## Usage

```python
from flaskmogrify import app
```


# [Changelog]

## v0.0.3  _20170608_
Initial Github publish. 

## v0.0.12  _20200412_
bumped some requirement versions. 
other tweaks to try to get it working

## v0.0.13  _20200412_
manifest includes

## v0.0.14  _20200417_
bumped requirements versions