Skip to main content

An easy way to find a countries coordinates by name

Project description

pygeolocate

Get a country by its full name

# pygeolocate/examples/get_country_by_full_name.py
import pygeolocate

united_kingdom = pygeolocate.locate_by_name("united kingdom")

print(country)
print(country.name)
print(country.coordinates)
print(country.coordinates[0])
print(country.coordinates['long'])

Get a country by part of its name

# pygeolocate/examples/get_country_by_partial_name.py

import pygeolocate

for country in pygeolocate.locate_by_name("united"):
    print(country)
    print(country.name)
    print(country.coordinates)
    print(country.coordinates[0])
    print(country.coordinates['long'])

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

pygeolocate-1.0.8.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

pygeolocate-1.0.8-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file pygeolocate-1.0.8.tar.gz.

File metadata

  • Download URL: pygeolocate-1.0.8.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for pygeolocate-1.0.8.tar.gz
Algorithm Hash digest
SHA256 223a4a00da2721b428fb2bbc77582d509379889424fcb3dbcb6c8048d24eeaf6
MD5 7a42eb7d6f6bc8c907c49f915bea340f
BLAKE2b-256 9ba1969f85d5240296ff62e784ed989bb67343e53699515f595a348513fd2f79

See more details on using hashes here.

File details

Details for the file pygeolocate-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: pygeolocate-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for pygeolocate-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 42f5f2b42382992330b91525ba31dc1fb342f1845db616ffd40ef3c76daf914c
MD5 20b1d5e73a0efc7d839c8681ff3e29b1
BLAKE2b-256 b766331e8db91824bdbdba40675481093c42ee086159860890d4d4ad9390be40

See more details on using hashes here.

Supported by

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