Skip to main content

Very simple and lightweight geocoder

Project description

GeoGetter

GeoGetter Logo

GeoGetter is a simple Python library and command-line tool that helps you retrieve geographic information for a given location using various APIs. Whether you need latitude and longitude coordinates, address details, or timezone information, GeoGetter has got you covered.

Features

  • Retrieve latitude and longitude coordinates for a location.
  • Get detailed address information (country, city, postal code, etc.).
  • Fetch timezone data for a specific location.
  • Easy-to-use Python library with a command-line interface.

GitHub repository

🔗 geogetter GitHub repo

Installation

You can install GeoGetter using pip (consider using venv):

pip install geogetter

Using geogetter

from geogetter import Geocoder

easter_island = Geocoder("Easter Island")

print(easter_island.lat, easter_island.lon)

Running this script should result in this output

-27.1259451 -109.34963353785872

It's also possible to get more detailed information about the target using following code:

from geogetter import Geocoder

big_ben = Geocoder("Big Ben", address_json=True)

print(big_ben.target_name, "\n")

for item in big_ben.address_json:
    print(f"{item}: {big_ben.address_json.get(item)}")

This should result in the following std out:

Big Ben, Bridge Street, Westminster, Millbank, City of Westminster, Greater London, England, SW1A 2JX, United Kingdom 

amenity: Big Ben
road: Bridge Street
quarter: Westminster
suburb: Millbank
city: City of Westminster
ISO3166-2-lvl8: GB-WSM
state_district: Greater London
state: England
ISO3166-2-lvl4: GB-ENG
postcode: SW1A 2JX
country: United Kingdom
country_code: gb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geogetter-0.2.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geogetter-0.2.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file geogetter-0.2.1.tar.gz.

File metadata

  • Download URL: geogetter-0.2.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for geogetter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 14c377dbb1b43cd3fc570617d1e1d6e1152a512c2961c872c2e948e4a67560be
MD5 3c91e9cc67a88bf7d24437e4bc2cef1a
BLAKE2b-256 b1b5d38c5d7892981babdffcd8ee9e55e635683b1981eaf12486438209f858c3

See more details on using hashes here.

File details

Details for the file geogetter-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: geogetter-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for geogetter-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 012551217593c843c22dcda4686bf7f2363c9881b8084588993c6b2eab8f65ed
MD5 89873c170765e06fa061315e9d7e6f92
BLAKE2b-256 dd2361489c5c2804cd1b4195b873f3cb855b540feeb7f860fefaaa4c3aafd1e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page