{ "info": { "author": "ZhenningLang", "author_email": "zhenninglang@163.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# IP2LOC\n\nA tiny web server for ipv4 to geo location conversion\n\n## System Prerequisites\n\n- [SQLite](https://www.sqlite.org/index.html) is available \n(SQLite is included by default in [these systems](https://en.wikipedia.org/wiki/SQLite#Operating_systems).)\n- Only Python3 supported, `>= 3.6` is preferred.\n\n## Quick Start\n\n### Installation & Run\n\n```bash\npip install --user ip2loc-server\nip2loc\n```\n\nNow you have already started the server. \nTry\n\n```bash\ncurl localhost:8080/ip2loc?ip=216.58.221.228\n# {\"ip\": \"216.58.221.228\", \"country_code\": \"NL\", \"country_name\": \"Netherlands\", \"region_name\": \"Noord-Holland\", \"city_name\": \"Amsterdam\", \"latitude\": 52.37403, \"longitude\": 4.88969}\ncurl localhost:8080/url2loc?url=www.google.com\n# {\"ip\": \"216.58.221.228\", \"country_code\": \"NL\", \"country_name\": \"Netherlands\", \"region_name\": \"Noord-Holland\", \"city_name\": \"Amsterdam\", \"latitude\": 52.37403, \"longitude\": 4.88969}\ncurl localhost:8080/url2loc?url=https://www.google.com\n# {\"ip\": \"216.58.221.228\", \"country_code\": \"NL\", \"country_name\": \"Netherlands\", \"region_name\": \"Noord-Holland\", \"city_name\": \"Amsterdam\", \"latitude\": 52.37403, \"longitude\": 4.88969}\n```\n\nto test the server is working well. Run `ip2loc -h` for more helps.\n\n### Server Port\n\nBy default the server listens to port `8080`, you could ONLY modify this in the configure file.\n(Arguments specified listening ports are not supported)\n\nIn addition multiple ports could be configured as\n\n```python\n# multiple listening port example\nPORTS = (8080, 8081, 8082,)\n```\n\n### Paths\n\nI deliberately do not list the data, configure and log paths in this README file,\nfor the reason that the default paths are all relative paths which are not easy to be described clearly.\n\nTo find these useful path info, run\n\n```bash\nip2loc --showpath\n```\n\n## Track the Latest Data\n\nAll the data used in this project is from \n[https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude](https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude).\n\nFor the reason that the data on this site are updated monthly, you need track the latest data manually.\n\n- Download \"IPV4CSV\" and remember the current version of data\n![IP2LocationSiteSnapshot](https://raw.githubusercontent.com/ZhenningLang/ip2loc-server/master/docs/images/IP2LocationLite.png)\n\n- Run `ip2loc --loaddata --dataver=\"current version\" --csv=\"CSV/DATA/PATH/NAME.CSV\"` or `ip2loc --loaddata --dataver=\"current version\" --zip=\"ZIP/DATA/PATH/NAME.ZIP\"`\n\n\n## How This Works\n\nBriefly: Binary search of ordered ip data\n\nSee [https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude](https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude) \nfor details of data structure.\n\n## Contact Me\n\n[zhenninglang@163.com](mailto:zhenninglang@163.com)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ZhenningLang/ip2loc_server", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ip2loc-server", "package_url": "https://pypi.org/project/ip2loc-server/", "platform": "", "project_url": "https://pypi.org/project/ip2loc-server/", "project_urls": { "Homepage": "https://github.com/ZhenningLang/ip2loc_server" }, "release_url": "https://pypi.org/project/ip2loc-server/0.0.1/", "requires_dist": null, "requires_python": ">=3.5", "summary": "A tiny web server for ipv4 to geo location conversion", "version": "0.0.1" }, "last_serial": 4990589, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "25ee5178569f5839cb0c90fefda4cf23", "sha256": "f88b37ac7eaa153b734cc06242056c1ec23243141317359ed4d04a46f4c9709f" }, "downloads": -1, "filename": "ip2loc_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "25ee5178569f5839cb0c90fefda4cf23", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 42198196, "upload_time": "2019-03-27T02:56:01", "url": "https://files.pythonhosted.org/packages/c1/76/9b495aacf1a591155219ac6ccf25bb5516ba3e80b8ef47207ea528e41902/ip2loc_server-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a5bb20a2e6617baae080646f8227468", "sha256": "2d8b0c69babe6dac16764e79a6a767250fd7abdc911db4e75586cd832d4facb8" }, "downloads": -1, "filename": "ip2loc_server-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7a5bb20a2e6617baae080646f8227468", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 42198264, "upload_time": "2019-03-27T02:57:19", "url": "https://files.pythonhosted.org/packages/c5/bc/53aa8207c9b4690d51f95d107996f20298b08a9fee3604ede858b38f7f25/ip2loc_server-0.0.1.tar.gz" } ], "0.0.1b1": [ { "comment_text": "", "digests": { "md5": "b0a13e12f07622d2a9282625a72b0be1", "sha256": "1dc4192ba0d7b2bc79f723fafa429b03544b9303d85d20ef12e659de6e36ba4f" }, "downloads": -1, "filename": "ip2loc_server-0.0.1b1-py3-none-any.whl", "has_sig": false, "md5_digest": "b0a13e12f07622d2a9282625a72b0be1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 42198174, "upload_time": "2019-03-27T02:42:47", "url": "https://files.pythonhosted.org/packages/08/fd/a85a8f6ace69f3876f6ac7cf3fedd919034ce7d2fcc2da5d12ba1bd8f8fb/ip2loc_server-0.0.1b1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "515d8a87c2e556512eb3e8284884b983", "sha256": "440e3de33cb2cd5c0ce81b44e8581e139654d12149782e4fee91895b37c8e3c9" }, "downloads": -1, "filename": "ip2loc_server-0.0.1b1.tar.gz", "has_sig": false, "md5_digest": "515d8a87c2e556512eb3e8284884b983", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 42198233, "upload_time": "2019-03-27T02:44:51", "url": "https://files.pythonhosted.org/packages/5c/57/7b74369d4ae8381fe3522b4946847a7530af24f60a92d8111857ba0daff5/ip2loc_server-0.0.1b1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25ee5178569f5839cb0c90fefda4cf23", "sha256": "f88b37ac7eaa153b734cc06242056c1ec23243141317359ed4d04a46f4c9709f" }, "downloads": -1, "filename": "ip2loc_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "25ee5178569f5839cb0c90fefda4cf23", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 42198196, "upload_time": "2019-03-27T02:56:01", "url": "https://files.pythonhosted.org/packages/c1/76/9b495aacf1a591155219ac6ccf25bb5516ba3e80b8ef47207ea528e41902/ip2loc_server-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a5bb20a2e6617baae080646f8227468", "sha256": "2d8b0c69babe6dac16764e79a6a767250fd7abdc911db4e75586cd832d4facb8" }, "downloads": -1, "filename": "ip2loc_server-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7a5bb20a2e6617baae080646f8227468", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 42198264, "upload_time": "2019-03-27T02:57:19", "url": "https://files.pythonhosted.org/packages/c5/bc/53aa8207c9b4690d51f95d107996f20298b08a9fee3604ede858b38f7f25/ip2loc_server-0.0.1.tar.gz" } ] }