Haversine 
Calculate the distance (in km or in miles) between two points on Earth, located by their latitude and longitude.
Example: distance between Lyon and Paris
from haversine import haversine
lyon = (45.7597, 4.8422) # (lat, lon)
paris = (48.8567, 2.3508)
haversine(lyon, paris)
# 392.21671780659625 # in kilometers
haversine(lyon, paris, miles=True)
# 243.71209416020253 # in miles
haversine(lyon, paris, nautical_miles=True)
# 211.7801622966963 # in nautical miles
Installation
$ pip install haversine
Contributing
Clone the project
Install pipenv.
Run pipenv install
Launch test with pipenv run pytest
Metadata
Release files for haversine 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| haversine-1.0.1.tar.gz | 2.2 kB | Without provenance | Details for haversine-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| haversine-1.0.1-py2-none-any.whl | Python 2 | none | any | Details for haversine-1.0.1-py2-none-any.whl |
Total release size: 6.0 kB
Release files / haversine-1.0.1.tar.gz
| Download URL | haversine-1.0.1.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e13332a9bcab2e902f5c7d2fd3085959a32ede673bbfa8aa5aad1e0aaf686ee
|
|
BLAKE2b-256 checksum How to use checksums |
ed5950f041ea977dbb015925ee2ac95516eb3c4567f495e46844ef5d2ba7437c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.13
|
Release files / haversine-1.0.1-py2-none-any.whl
| Download URL | haversine-1.0.1-py2-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
14458b233831b680c7508c5ee373a4f51986dcb0c8b412a504104ee86f1ed6f7
|
|
BLAKE2b-256 checksum How to use checksums |
af4686f3adc0957de8a6adfc5cd3e4587835e47bd202486c4ffc19a146ac4c8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.13
|
Security for haversine 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.