Skip to main content

Python package for mapping pins to the place where it belong

Project description

indiapins

https://img.shields.io/pypi/v/indiapins?label=PyPI&logo=PyPI&logoColor=white&color=blue Python versions Build Downloads Updates

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

Installation

Install the plugin using ‘pip’:

$ pip install indiapins

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

$ 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 Python 3.8, 3.9, 3.10, 3.11 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

indiapins.matching('110011')

[{'Name': 'Nirman Bhawan', 'BranchType': 'Sub Post Office', 'DeliveryStatus': 'Delivery', 'Circle': 'Delhi', 'District': 'Central Delhi', 'Division': 'New Delhi Central', 'Region': 'Delhi', 'Block': 'New Delhi', 'State': 'Delhi', 'Country': 'India', 'Pincode': '110011'},
{'Name': 'South Avenue', 'BranchType': 'Sub Post Office', 'DeliveryStatus': 'Non-Delivery', 'Circle': 'Delhi', 'District': 'Central Delhi', 'Division': 'New Delhi Central', 'Region': 'Delhi', 'Block': 'New Delhi', 'State': 'Delhi', 'Country': 'India', 'Pincode': '110011'},
{'Name': 'Udyog Bhawan', 'BranchType': 'Sub Post Office', 'DeliveryStatus': 'Non-Delivery', 'Circle': 'Delhi', 'District': 'Central Delhi', 'Division': 'New Delhi Central', 'Region': 'Delhi', 'Block': 'New Delhi', 'State': 'Delhi', 'Country': 'India', 'Pincode': '110011'}]

2. Valid Pincode

To check if the given Pincode is valid or not

indiapins.isvalid('110011')

True

3. District by Pincode

It extracts the district of given Indian pincode

indiapins.districtmatch('302005')

'Jaipur'

4. Coordinates of Pincode

It extracts all the coordinates of given Indian pincode

indiapins.coordinates('110011')

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

History

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

Project details


Download files

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

Source Distribution

indiapins-1.0.1.tar.gz (2.3 MB view hashes)

Uploaded Source

Built Distribution

indiapins-1.0.1-py2.py3-none-any.whl (2.3 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page