min-distance


Namemin-distance JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/vanshbhardwajhere/min_distance
SummaryA simple Python package to calculate the minimum distance between two geographic points
upload_time2025-08-10 01:31:03
maintainerNone
docs_urlNone
authorVansh
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # min_distance

[![PyPI version](https://img.shields.io/pypi/v/min_distance.svg)](https://pypi.org/project/min_distance/)
[![Python Version](https://img.shields.io/pypi/pyversions/min_distance.svg)](https://pypi.org/project/min_distance/)

Calculate the minimum distance between two geographic points (latitude and longitude) using the Haversine formula in Python.

---

## Features

- Simple and lightweight Python package
- Accurate distance calculation on Earth’s surface (in kilometers)
- Easy to integrate into any Python project
- Well-tested with unit tests included

---

## Installation

Install via pip:

```bash
pip install min_distance
```

---

## Usage

```python
from min_distance import calculate_min_distance

lat1, lon1 = 40.7128, -74.0060  # New York
lat2, lon2 = 51.5074, -0.1278   # London

distance_km = calculate_min_distance(lat1, lon1, lat2, lon2)
print(f"Distance: {distance_km:.2f} km")
```

---

## API Reference

### `calculate_min_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> float`

Calculate the minimum distance between two points on the Earth specified by latitude and longitude.

- **Parameters:**
  - `lat1`, `lon1`: Latitude and Longitude of the first point in decimal degrees.
  - `lat2`, `lon2`: Latitude and Longitude of the second point in decimal degrees.

- **Returns:** Distance in kilometers as a `float`.

---

## Development

Want to contribute? Feel free to open issues or submit pull requests!

Run tests with:

```bash
python -m unittest discover -s tests
```

---

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## Author

Vansh  
[GitHub](https://github.com/vanshbhardwajhere) | [LinkedIn](https://linkedin.com/in/vanshbhardwajhere)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vanshbhardwajhere/min_distance",
    "name": "min-distance",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Vansh",
    "author_email": "vanshbhardwajhere@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/de/22/3914bd7bf2c731b6566423ba1aed6f3547ac29f0920326984e42be57a5e2/min_distance-1.0.1.tar.gz",
    "platform": null,
    "description": "# min_distance\r\n\r\n[![PyPI version](https://img.shields.io/pypi/v/min_distance.svg)](https://pypi.org/project/min_distance/)\r\n[![Python Version](https://img.shields.io/pypi/pyversions/min_distance.svg)](https://pypi.org/project/min_distance/)\r\n\r\nCalculate the minimum distance between two geographic points (latitude and longitude) using the Haversine formula in Python.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- Simple and lightweight Python package\r\n- Accurate distance calculation on Earth\u2019s surface (in kilometers)\r\n- Easy to integrate into any Python project\r\n- Well-tested with unit tests included\r\n\r\n---\r\n\r\n## Installation\r\n\r\nInstall via pip:\r\n\r\n```bash\r\npip install min_distance\r\n```\r\n\r\n---\r\n\r\n## Usage\r\n\r\n```python\r\nfrom min_distance import calculate_min_distance\r\n\r\nlat1, lon1 = 40.7128, -74.0060  # New York\r\nlat2, lon2 = 51.5074, -0.1278   # London\r\n\r\ndistance_km = calculate_min_distance(lat1, lon1, lat2, lon2)\r\nprint(f\"Distance: {distance_km:.2f} km\")\r\n```\r\n\r\n---\r\n\r\n## API Reference\r\n\r\n### `calculate_min_distance(lat1: float, lon1: float, lat2: float, lon2: float) -> float`\r\n\r\nCalculate the minimum distance between two points on the Earth specified by latitude and longitude.\r\n\r\n- **Parameters:**\r\n  - `lat1`, `lon1`: Latitude and Longitude of the first point in decimal degrees.\r\n  - `lat2`, `lon2`: Latitude and Longitude of the second point in decimal degrees.\r\n\r\n- **Returns:** Distance in kilometers as a `float`.\r\n\r\n---\r\n\r\n## Development\r\n\r\nWant to contribute? Feel free to open issues or submit pull requests!\r\n\r\nRun tests with:\r\n\r\n```bash\r\npython -m unittest discover -s tests\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n---\r\n\r\n## Author\r\n\r\nVansh  \r\n[GitHub](https://github.com/vanshbhardwajhere) | [LinkedIn](https://linkedin.com/in/vanshbhardwajhere)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple Python package to calculate the minimum distance between two geographic points",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/vanshbhardwajhere/min_distance"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "378e9613dd60b176c782fb0a7c0129b8047f1ffed96c7069a2656a609a4018b0",
                "md5": "14d02e003e108a1a39c1766331fd79d8",
                "sha256": "248b6a218d53a926a9454d08485b9e86a2f3935fc78e5ed5ac5965963ccad654"
            },
            "downloads": -1,
            "filename": "min_distance-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "14d02e003e108a1a39c1766331fd79d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3698,
            "upload_time": "2025-08-10T01:31:01",
            "upload_time_iso_8601": "2025-08-10T01:31:01.876920Z",
            "url": "https://files.pythonhosted.org/packages/37/8e/9613dd60b176c782fb0a7c0129b8047f1ffed96c7069a2656a609a4018b0/min_distance-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "de223914bd7bf2c731b6566423ba1aed6f3547ac29f0920326984e42be57a5e2",
                "md5": "d231479a10c13bbf3ac190fa42605a91",
                "sha256": "d49f3d433e52e3bd2d2a8d1ebba0ae8c7ebffd7f476f3f1a953321e2bac3a5e1"
            },
            "downloads": -1,
            "filename": "min_distance-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d231479a10c13bbf3ac190fa42605a91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3604,
            "upload_time": "2025-08-10T01:31:03",
            "upload_time_iso_8601": "2025-08-10T01:31:03.554958Z",
            "url": "https://files.pythonhosted.org/packages/de/22/3914bd7bf2c731b6566423ba1aed6f3547ac29f0920326984e42be57a5e2/min_distance-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-10 01:31:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vanshbhardwajhere",
    "github_project": "min_distance",
    "github_not_found": true,
    "lcname": "min-distance"
}
        
Elapsed time: 1.85370s