{"id":18648985,"url":"https://github.com/pokeapi/pokebase","last_synced_at":"2025-12-11T23:09:34.791Z","repository":{"id":43850999,"uuid":"86950629","full_name":"PokeAPI/pokebase","owner":"PokeAPI","description":"Python 3 wrapper for Pokéapi v2","archived":false,"fork":false,"pushed_at":"2023-12-29T20:30:57.000Z","size":117,"stargazers_count":320,"open_issues_count":15,"forks_count":56,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-13T07:47:45.301Z","etag":null,"topics":["hacktoberfest","pokeapi","python","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PokeAPI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-01T23:59:58.000Z","updated_at":"2025-04-05T17:47:46.000Z","dependencies_parsed_at":"2023-01-25T11:02:10.821Z","dependency_job_id":"690c25b9-586a-41d9-8dfb-f86d75f581d6","html_url":"https://github.com/PokeAPI/pokebase","commit_stats":{"total_commits":73,"total_committers":6,"mean_commits":"12.166666666666666","dds":0.3561643835616438,"last_synced_commit":"08d09a2c996cf34c0c6c2d55944db1433dad9d17"},"previous_names":["greghilmes/pokebase"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokebase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokebase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokebase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokebase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PokeAPI","download_url":"https://codeload.github.com/PokeAPI/pokebase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"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":["hacktoberfest","pokeapi","python","wrapper"],"created_at":"2024-11-07T06:34:40.649Z","updated_at":"2025-12-11T23:09:34.760Z","avatar_url":"https://github.com/PokeAPI.png","language":"Python","readme":"# Pokebase [![swampert](https://veekun.com/dex/media/pokemon/main-sprites/heartgold-soulsilver/260.png)](https://pokeapi.co/api/v2/pokemon/swampert)\n\n[![actions](https://github.com/PokeAPI/pokebase/actions/workflows/unit.yml/badge.svg)](https://github.com/PokeAPI/pokebase/actions/workflows/unit.yml)\n[![Python 3.6 pypi](https://img.shields.io/badge/Python%203.6%20pypi-1.3.0-blue.svg)](https://pypi.org/project/pokebase/1.3.0/)\n[![Python \u003e=3.8 github](https://img.shields.io/badge/Python%20\u003e=3.8%20github-1.4.1-blue.svg)](https://pypi.python.org/pypi/pokebase)\n\n`pokebase` is a simple but powerful Python interface to the [PokeAPI database](https://pokeapi.co/)\n\nMaintainer: [GregHilmes](https://github.com/GregHilmes)\n\n## Installation\n\n### Version Support\n\npokebase 1.3.0 supports Python 3.6. Install it with `pip install 'pokebase==1.3.0'`\n\npokebase 1.4.1 drops support for Python 3.6 and adds support for Python \\\u003e=3.8 \\\u003c=3.12. Install it with `pip install pokebase`\n\n## Usage\n\n```python console\n\u003e\u003e\u003e import pokebase as pb\n\u003e\u003e\u003e chesto = pb.APIResource('berry', 'chesto')\n\u003e\u003e\u003e chesto.name\n'chesto'\n\u003e\u003e\u003e\nchesto.natural_gift_type.name\n'water'\n\u003e\u003e\u003e charmander = pb.pokemon('charmander') # Quick lookup.\n\u003e\u003e\u003e charmander.height\n6\n\u003e\u003e\u003e # Now with sprites! (again!)\n\u003e\u003e\u003e s1 = pb.SpriteResource('pokemon', 17)\n\u003cpokebase.interface.SpriteResource object at 0x7f2f15660860\u003e\n\u003e\u003e\u003e s1.url\n'\u003chttps://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/17.png\u003e'\n\u003e\u003e\u003e s2 = pb.SpriteResource('pokemon', 1, other=True, official_artwork=True)\n\u003e\u003e\u003e s2.path\n'/home/user/.cache/pokebase/sprite/pokemon/other-sprites/official-artwork/1.png'\n\u003e\u003e\u003e s3 = pb.SpriteResource('pokemon', 3, female=True, back=True)\n\u003e\u003e\u003e s3.img_data b'x89PNGrnx1anx00x00x00rIHDRx00x00x00 ... xca^x7fxbbd\\*x00x00x00x00IENDxaeB`x82'\n```\n\n... And it's just that simple.\n\n## Nomenclature\n\n\u003e -   an `endpoint` is the results of an API call like\n\u003e     `http://pokeapi.co/api/v2/berry` or\n\u003e     `http://pokeapi.co/api/v2/move`\n\u003e -   a `resource` is the actual data, from a call to\n\u003e     `http://pokeapi.co/api/v2/pokemon/1`\n\n## Testing\n\nPython unit tests are in a separate `tests` directory and can be run via\n`python -m tests`.\n\n### Notes to the developer using this module\n\nThe quick data lookup for a Pokémon type, is `pokebase.type_('type-name')`, not `pokebase.type('type-name')`. This is because of a naming conflict with the built-in `type` function, were you to `from pokebase import *`.\n\nWhen changing the cache, avoid importing the cache constants directly. You should only import them with the whole cache module. If you do not do this, calling `set_cache` will not change your local copy of the variable.\n\nNOT THIS!\n\n```python console\n\u003e\u003e\u003e from pokebase.cache import API_CACHE\n```\n\nDo this :)\n\n```python console\n\u003e\u003e\u003e from pokebase import cache\n\u003e\u003e\u003e cache.API_CACHE\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokeapi%2Fpokebase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpokeapi%2Fpokebase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokeapi%2Fpokebase/lists"}