{"id":22080367,"url":"https://github.com/theakashshukla/bank-api","last_synced_at":"2026-05-08T13:45:56.880Z","repository":{"id":197438074,"uuid":"698652845","full_name":"theakashshukla/bank-api","owner":"theakashshukla","description":"Flask, GraphQL queries for retrieving bank branch data from a CSV file.","archived":false,"fork":false,"pushed_at":"2023-10-21T14:56:54.000Z","size":4571,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T04:22:20.093Z","etag":null,"topics":["api","bank-api","csv","flask","graphql","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theakashshukla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-30T14:58:59.000Z","updated_at":"2024-05-19T19:18:18.000Z","dependencies_parsed_at":"2024-01-19T02:31:58.687Z","dependency_job_id":null,"html_url":"https://github.com/theakashshukla/bank-api","commit_stats":null,"previous_names":["theakashshukla/bank-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fbank-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fbank-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fbank-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theakashshukla%2Fbank-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theakashshukla","download_url":"https://codeload.github.com/theakashshukla/bank-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245168817,"owners_count":20571799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bank-api","csv","flask","graphql","python"],"created_at":"2024-11-30T23:13:54.869Z","updated_at":"2026-05-08T13:45:51.855Z","avatar_url":"https://github.com/theakashshukla.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bank Branches API\n\nThis project is a Python web API service built with Flask that supports GraphQL queries for retrieving bank branch data from a CSV file.\n\n![image](https://github.com/theakashshukla/bank-api/assets/49320497/e6351309-86ae-4ac8-a5b6-89eec55184f1)\n\n\n## API Purpose\n\nThe purpose of this API is to provide access to information about bank branches. It allows users to query and retrieve data about various bank branches using GraphQL queries.\n\n## Endpoints\n\n- The API is hosted on Flask, and the GraphQL endpoint is available at `/gql`. Users can send GraphQL queries to this endpoint.\n\n## Data Source\n\n- The API reads data from a CSV file named `bank_branches.csv`. This file contains information about bank branches, including IFSC codes, branch names, bank names, addresses, cities, districts, states, and more.\n\n## GraphQL Queries\n\n- Users can use GraphQL queries to request specific data about bank branches. An example query is provided below:\n\n   ```graphql\n   query {\n       branches {\n           edges {\n               node {\n                   branch\n                   bank {\n                       name\n                   }\n                   ifsc\n               }\n           }\n       }\n   }\n\nThis query requests information about bank branches, including the branch name, the name of the bank it belongs to, and the IFSC code.\n\n## Code Implementation\n- The implementation is based on Flask and Flask-GraphQL, which is a Flask extension for creating GraphQL APIs.\n- Code snippets for loading data from the CSV file and returning it as a GraphQL response have been provided.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- Python (version 3.6 or higher) installed on your system.\n- Python virtual environment set up.\n\n# Installation\n\n1. **Clone this repository to your local machine:**\n\n   ```shell\n   git clone https://github.com/theakashshukla/bank-api.git\n   ```\n\n2. **Navigate to the project folder:**\n\n   ```shell\n   cd bank-api\n   ```\n\n3. **Create a virtual environment:**\n\n   ```shell\n   python -m venv venv\n   ```\n\n4. **Activate the virtual environment:**\n\n   - On Windows:\n\n     ```shell\n     venv\\Scripts\\activate\n     ```\n\n   - On macOS and Linux:\n     ```shell\n     source venv/bin/activate\n     ```\n\n5. **Install the required Python packages:**\n\n   ```shell\n   pip install -r requirements.txt\n   ```\n\n   OR\n\n   ```shell\n   pip install Flask Flask-GraphQL graphene\n   ```\n\n## Usage\n\n1. **Start the Flask app:**\n\n   ```shell\n   python app.py\n   ```\n\n   The app will run at `http://localhost:5000`.\n\n2. **Open a web browser and navigate to `http://localhost:5000/gql`.** This will open the GraphiQL interface.\n\n3. **Use the GraphiQL interface to execute GraphQL queries to retrieve bank branch data.**\n\n   Sample GraphQL Query:\n\n   ```graphql\n   query {\n     branches {\n       ifsc\n       branch\n       bank\n     }\n   }\n   ```\n\n   Press the \"Play\" button to execute the query and view the results.\n\n## Data Loading\n\nThe data loading logic in `app.py` reads data from the `bank_branches.csv` file. Ensure that the CSV file is located in the same directory as `app.py` and follows the correct format:\n\n```\nifsc,bank_id,branch,address,city,district,state,bank_name\n```\n\n## Contributing\n\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Make your changes and commit them.\n- Push your changes to your fork.\n- Submit a pull request to the original repository.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheakashshukla%2Fbank-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheakashshukla%2Fbank-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheakashshukla%2Fbank-api/lists"}