Skip to main content

Calculate the distance (in km or in miles) bewteen two points on Earth, located by their latitude and longitude.

Example: distance bewteen Lyon and Paris

>>> from haversine import haversine
>>> lyon = (45.7597, 4.8422)
>>> paris = (48.8567, 2.3508)
>>> haversine(lyon, paris)
392.00124794121825  # in kilometers
>>> haversine(lyon, paris, miles=True)
243.589575470673  # in miles

Download files

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

Source Distribution

haversine-0.4.5.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file haversine-0.4.5.tar.gz.

File metadata

  • Download URL: haversine-0.4.5.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for haversine-0.4.5.tar.gz
Algorithm Hash digest
SHA256 56a12298851a455fb80a8d7e8c7c5548b623d5d1bffc9eba16e7855d9eec5c3c
MD5 555c853c2bd88fcad335dc910d176af4
BLAKE2b-256 57b43b1f5ca78876ad00cbb2a2bf7bcebfe4751c00ddabc47005b59f33835646

See more details on using hashes here.

Release history Release notifications | RSS feed

2.9.0

2 files

2.8.1

2 files

2.8.0

2 files

2.7.0

2 files

2.6.0

2 files

2.5.1

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

3 files

1.0.2

2 files

1.0.1

2 files

1.0.0

1 file

0.5.0

1 file

This release

0.4.5 This release

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

0.3

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page