Metadata-Version: 2.4
Name: indiapins
Version: 1.0.5
Summary: Python package for mapping pins to the place where it belong
Home-page: https://github.com/pawangeek/indiapins
Author: Pawan Kumar Jain
Author-email: pawanjain.432@gmail.com
License: MIT license
Keywords: indiapins india pincodes zipcodes
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: Click>=8.1.8
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

=========
indiapins
=========


.. image:: https://img.shields.io/pypi/v/indiapins?label=PyPI&logo=PyPI&logoColor=white&color=blue
        :target: https://pypi.python.org/pypi/indiapins

.. image:: https://img.shields.io/pypi/pyversions/indiapins?label=Python&logo=Python&logoColor=white
    :target: https://www.python.org/downloads
    :alt: Python versions

.. image:: https://ci.appveyor.com/api/projects/status/43hcwr4me6vjb1fg?svg=true
        :target: https://ci.appveyor.com/project/pawangeek/indiapins
        :alt: Build

.. image:: https://static.pepy.tech/badge/indiapins
     :target: https://pepy.tech/project/indiapins
     :alt: Downloads


**Indiapins is a Python package for getting the places tagged to particular Indian pincode**

**Data is last updated February 15, 2026, with 165,627 area pin codes**

* Free software: MIT license
* Documentation: https://pawangeek.github.io/indiapins/
* Github Repo: https://github.com/pawangeek/indiapins
* PyPI: https://pypi.org/project/indiapins/


Installation
------------

Install the plugin using 'pip':

.. code-block:: shell

   $ pip install indiapins

Alternatively, install from source by cloning this repo then running
'setup.py':

.. code-block:: shell

   $ python setup.py install


Features
--------
* Get all the mappings of given pins
* The Python sqlite3 module is not required, so easily to use in Clouds (no additional dependencies)
* Works with 3.9, 3.10, 3.11, 3.12, 3.13 and PyPy
* Cross-platform: Windows, Mac, and Linux are officially supported.
* Simple usage and very fast results


Examples
--------

1. Exact Match
##############

To find the names of all places, districts, circles and related information by given Indian Pincode

**Important: The Pincode should be of 6 digits, in string format**

.. code-block:: python

    indiapins.matching('110011')

    [{'Name': 'Nirman Bhawan', 'BranchType': 'PO', 'DeliveryStatus': 'Delivery', 
      'Circle': 'Delhi Circle', 'District': 'NEW DELHI', 'Division': 'New Delhi Central Division', 
      'Region': 'Delhi Region', 'State': 'DELHI', 'Pincode': 110011,
      'Latitude': 28.6108611, 'Longitude': 77.2148611},
     {'Name': 'Udyog Bhawan', 'BranchType': 'PO', 'DeliveryStatus': 'Non Delivery', 
      'Circle': 'Delhi Circle', 'District': 'NEW DELHI', 'Division': 'New Delhi Central Division',
      'Region': 'Delhi Region', 'State': 'DELHI', 'Pincode': 110011,
      'Latitude': 28.6111111, 'Longitude': 77.2127500}]


2. Valid Pincode
################

To check if the given Pincode is valid or not

.. code-block:: python

    indiapins.isvalid('110011')

    True

3. District by Pincode
######################

It extracts the district of given Indian pincode

.. code-block:: python

    indiapins.districtmatch('302005')

    'Jaipur'

4. Coordinates of Pincode
#########################

It extracts all the coordinates of given Indian pincode

.. code-block:: python

    indiapins.coordinates('110011')

    {'Udyog Bhawan': {'latitude': '28.6111111', 'longitude': '77.2127500'},
    'Nirman Bhawan': {'latitude': '28.6108611', 'longitude': '77.2148611'}}


=======
History
=======
1.0.5 (2026-02-15)
------------------

* Fixed KeyError bug caused by inconsistent key casing in data
* Updated pincode database with 8,436 new records (165,627 total)
* Enhanced coordinates and district matching functions

1.0.4 (2025-01-26)
------------------

* Added new pins

1.0.2 (2024-08-10)
------------------

* Added latest libs

1.0.1 (2023-09-12)
------------------

* Fix pins import error

0.1.7 (2023-09-11)
------------------

* Update Pincode data to latest (Sept 2023)
* Added coordinates info with pins
* Fetch longitude and latitude of any pin
* Update security vulnerabilities

0.1.0 (2021-07-27)
------------------

* Match location with the pins
* Mark pin is valid or not
* Extract cities on basis of pins
