{"id":25449303,"url":"https://github.com/dpfens/world-bank-python","last_synced_at":"2025-11-02T02:30:29.528Z","repository":{"id":90663440,"uuid":"102167018","full_name":"dpfens/World-Bank-Python","owner":"dpfens","description":"A Python World Bank API wrapper","archived":false,"fork":false,"pushed_at":"2024-03-11T01:15:54.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-11T02:28:50.990Z","etag":null,"topics":["api","country","data","economy","indicators","python","worldbank"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpfens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-09-02T02:20:52.000Z","updated_at":"2024-03-11T02:28:53.226Z","dependencies_parsed_at":"2023-07-09T03:45:51.339Z","dependency_job_id":null,"html_url":"https://github.com/dpfens/World-Bank-Python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfens%2FWorld-Bank-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfens%2FWorld-Bank-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfens%2FWorld-Bank-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpfens%2FWorld-Bank-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpfens","download_url":"https://codeload.github.com/dpfens/World-Bank-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239360718,"owners_count":19625854,"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","country","data","economy","indicators","python","worldbank"],"created_at":"2025-02-17T20:27:31.219Z","updated_at":"2025-11-02T02:30:29.308Z","avatar_url":"https://github.com/dpfens.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# World Bank API\nA Python 2/3 wrapper for the World Bank API\nSee World Bank [Developer Information](https://datahelpdesk.worldbank.org/knowledgebase/topics/125589-developer-information) to get information on the raw API\n\n\n## Quickstart\n```python\nfrom worldbank import api as wb\n\nsummary, indicators = wb.Indicator.get()\nsummary, country_indicators = wb.CountryIndicator.get(indicators[0])\nsummary, countries = wb.Country.get()\nsummary, lending_types = wb.LendingType.get()\nsummary, topics = wb.Topic.get()\nsummary, sources = wb.Source.get()\nsummary, income_levels = wb.IncomeLevel.get()\nsummary, indicators = wb.Indicator.get()\nsummary, countries = wb.Country.by_income_level(income_level=income_levels[0])\nsummary, country = wb.Country.by_lending_type(lending_types[0])\nsummary, indicators = wb.Indicator.by_source(sources[0])\nsummary, indicators = wb.Indicator.by_topic(topics[0])\nsummary, country_indicators = wb.CountryIndicator.get(indicators[0])\n```\n\nClasses are used to store the data returned by the API and the `classmethods` and Instance Methods are used to fetch data from the API\n\n* Catalog\n* City\n* Country\n* CountryIndicator\n* IncomeLevel\n* Indicator\n* LendingType\n* Region\n  * AdminRegion\n* Source\n* Topic\n\n## Pagination\nThe API wrapper allows pagination and adjusting page sizes of data using the `page` number and `per_page` `number:\n```python\nfrom worldbank import api as wb\n\ninstances = []\ncurrent_page = 1\ntotal_pages = float('inf')\ntotal_instances = float('inf')\nper_page = 500\nwhile current_page \u003c= total_pages:\n    summary, page_instances = Indicator.get(page=current_page, per_page=per_page)\n    total_pages = summary['pages']\n    total_instances = summary['total']\n    current_page += 1\n    instances += page_instances\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpfens%2Fworld-bank-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpfens%2Fworld-bank-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpfens%2Fworld-bank-python/lists"}