Coder Social home page Coder Social logo

kskarthik / indian-fincodes-api Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 3.95 MB

A REST API server for searching Indian banks, pincodes, HSN/SAC codes. Created using docker & meilisearch

Home Page: https://hub.docker.com/r/kskarthik/indian-fincodes-api

Python 100.00%
bank ifsc india meilisearch rest-api docker

indian-fincodes-api's Introduction

Indian Financial codes API docker ci badge

image

This repository contains scripts which builds a REST API service in a docker image

The following data is provided:

How it's done

The data is fetched from various sources, processed and indexed to the meilisearch docker image & a new image is created from it & pushed to docker hub. All this process is automated using github actions.

Links

Usage

docker pull kskarthik/indian-fincodes-api:latest

# set MEILI_MASTER_KEY to your preferred value
docker run --rm -d \
  -p 7700:7700 \
  -e MEILI_MASTER_KEY='MASTER_KEY'\
  kskarthik/indian-fincodes-api:latest

To access the server, Visit http://localhost:7700 in the browser

Examples

Get the list of indexes:

curl http://localhost:7700/indexes 
{
  "results": [
    {
      "uid": "banks",
      "createdAt": "2024-03-27T10:57:53.787331548Z",
      "updatedAt": "2024-03-27T10:58:11.549315386Z",
      "primaryKey": "IFSC"
    },
    {
      "uid": "hsn_sac_codes",
      "createdAt": "2024-03-27T11:03:32.334812729Z",
      "updatedAt": "2024-03-27T11:03:34.449263657Z",
      "primaryKey": "id"
    },
    {
      "uid": "pincodes",
      "createdAt": "2024-03-27T11:03:16.545030985Z",
      "updatedAt": "2024-03-27T11:03:24.393231938Z",
      "primaryKey": "id"
    }
  ],
  "offset": 0,
  "limit": 20,
  "total": 3
}

Perform search on an index:

 curl -s -X POST 'http://localhost:7700/indexes/pincodes/search' \
 -H 'Content-Type: application/json' \
 --data-binary '{
    "q": "500001",
    "limit": 2
  }'

{
  "hits": [
    {
      "id": 4678,
      "officename": "Moazzampura S.O",
      "pincode": "500001",
      "officeType": "S.O",
      "Deliverystatus": "Non-Delivery",
      "divisionname": "Hyderabad City",
      "regionname": "Hyderabad City",
      "circlename": "Andhra Pradesh",
      "Taluk": "Nampally",
      "Districtname": "Hyderabad",
      "statename": "ANDHRA PRADESH"
    },
    {
      "id": 4704,
      "officename": "Seetharampet S.O",
      "pincode": "500001",
      "officeType": "S.O",
      "Deliverystatus": "Non-Delivery",
      "divisionname": "Hyderabad City",
      "regionname": "Hyderabad City",
      "circlename": "Andhra Pradesh",
      "Taluk": "Nampally",
      "Districtname": "Hyderabad",
      "statename": "ANDHRA PRADESH"
    }
  ],
  "query": "500001",
  "processingTimeMs": 0,
  "limit": 2,
  "offset": 0,
  "estimatedTotalHits": 213
}

indian-fincodes-api's People

Contributors

kskarthik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

indian-fincodes-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.