GithubHelp home page GithubHelp logo

mathgeek12 / iptocc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roniemartinez/iptocc

0.0 0.0 0.0 12.38 MB

Get country code of IPv4/IPv6 address. Address lookup is done offline.

Home Page: http://roniemartinez.space/blog/the_free_and_simple_way_to_know_who_visits_your_site

License: MIT License

Python 100.00%

iptocc's Introduction

IPToCC

Get ISO country code of IPv4/IPv6 address. Address lookup is done locally.

  • No external API call.
  • No paid GeoIP service.

Read The Free and Simple Way To Know Who Visits Your Site.

Features

  • Thread-safe

Install

pip install IPToCC

Usage

import iptocc
country_code = iptocc.get_country_code('<IPv4/IPv6 address>')

Sources

  • ftp://ftp.afrinic.net/stats/afrinic/delegated-afrinic-extended-latest
  • ftp://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest
  • ftp://ftp.apnic.net/public/apnic/stats/apnic/delegated-apnic-extended-latest
  • ftp://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest
  • ftp://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest

Libraries Used

Old implementations

  • SQLAlchemy + SQLite - Not thread-safe
  • UnQLite - large database file, problems with thread-safety

References

Author

iptocc's People

Contributors

roniemartinez 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.