is-in-iran
A lightweight Python library that checks whether a given geographic point
(latitude, longitude) lies inside the borders of Iran.
It loads an official MultiPolygon GeoJSON of Iran and performs a
point-in-polygon check using Shapely.
🚀 Installation
pip install is-in-iran
🎯 Usage
from is_in_iran import is_in_iran
print(is_in_iran(35.6892, 51.3890)) # → True (Tehran)
print(is_in_iran(40.4168, -3.7038)) # → False (Madrid)
• Input format: (latitude, longitude) • CRS: WGS84 (standard GPS coordinates) • Points exactly on the border also return True.
Development Setup
- Create and activate a virtual environment.
- Install the package in editable mode:
pip install -e .
Resources
Metadata
Release files for is-in-iran 0.1.0
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 |
|---|---|---|---|---|
| is_in_iran-0.1.0.tar.gz | 29.3 kB | Without provenance | Details for is_in_iran-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| is_in_iran-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for is_in_iran-0.1.0-py3-none-any.whl |
Total release size: 57.8 kB
Release files / is_in_iran-0.1.0.tar.gz
| Download URL | is_in_iran-0.1.0.tar.gz |
|---|---|
| Size | 29.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ca0a78ce92c5590eb331bd02b2bc5797655b99680f4619832733fd88406f2ad
|
|
BLAKE2b-256 checksum How to use checksums |
6ae6c1a7517ae6fd78dab7c9cb7f4bed7bab82e91780145436960ccbc47500ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Release files / is_in_iran-0.1.0-py3-none-any.whl
| Download URL | is_in_iran-0.1.0-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f20a80363ea473863680b039638c5b29fd901ab5dc66f0bbf9b4e0ebd9d025d1
|
|
BLAKE2b-256 checksum How to use checksums |
c8dd9b68661d27539222493225595c18e0259cc9a2d905fd44410aafa701db6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.12
|
Security for is-in-iran 0.1.0
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.