Library to access/distribute DB-IP IP to City Lite Database
Project description
python-geoacumen-city
Installation
pip install python-geoacumen-city
Usage
>>> import geoacumen_city
>>> import maxminddb
>>> reader = maxminddb.open_database(geoacumen_city.db_path)
>>> reader.get("1.1.1.1")
{'city': {'names': {'en': 'Sydney'}},
'continent': {'code': 'OC',
'geoname_id': 6255151,
'names': {'de': 'Ozeanien',
'en': 'Oceania',
'es': 'Oceanía',
'fa': 'اقیانوسیه',
'fr': 'Océanie',
'ja': 'オセアニア',
'ko': '오세아니아',
'pt-BR': 'Oceania',
'ru': 'Океания',
'zh-CN': '大洋洲'}},
'country': {'geoname_id': 2077456,
'is_in_european_union': False,
'iso_code': 'AU',
'names': {'de': 'Australien',
'en': 'Australia',
'es': 'Australia',
'fa': 'استرالیا',
'fr': 'Australie',
'ja': 'オーストラリア',
'ko': '오스트레일리아',
'pt-BR': 'Austrália',
'ru': 'Австралия',
'zh-CN': '澳大利亚'}},
'location': {'latitude': -33.8688, 'longitude': 151.209},
'subdivisions': [{'names': {'en': 'New South Wales'}}]}
>>>
Note that you must still comply with the requirements of the DB-IP license specified here: https://db-ip.com/db/download/ip-to-city-lite
That is the following:
You are free to use this IP to City Lite database in your application, provided you give attribution to DB-IP.com for the data.
In the case of a web application, you must include a link back to DB-IP.com on pages that display or use results from the database. You may do it by pasting the HTML code snippet below into your code :
<a href='https://db-ip.com'>IP Geolocation by DB-IP</a>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python-geoacumen-city-2022.11.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | edfd03f7b4a75617b9686e3bf1ff844d1c58bbb6cb7b06e214f594b800535d57 |
|
MD5 | 3cd62a61b38d8dfc67e52971c2bfa5f0 |
|
BLAKE2b-256 | 2755f075d8d84696e0bf96651f24b0389d212f756eb6a4766a7cbba4708b2ef6 |
Close
Hashes for python_geoacumen_city-2022.11.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 828a45274ea449a17dd108c98a1b399e50ed1dbbb22cf7becc4a24f486cdafea |
|
MD5 | 29b67527491dc0e09bf0c70b4aea2fc8 |
|
BLAKE2b-256 | 5ae58297b8dd70a9c1800965711e01264f355c1a37cd56f3b3c3f8408a290b79 |