{"id":13631646,"url":"https://github.com/PokeAPI/pokeapi","last_synced_at":"2025-04-17T22:31:19.238Z","repository":{"id":24145449,"uuid":"27534934","full_name":"PokeAPI/pokeapi","owner":"PokeAPI","description":"The Pokémon API","archived":false,"fork":false,"pushed_at":"2025-04-17T06:36:55.000Z","size":47492,"stargazers_count":4647,"open_issues_count":148,"forks_count":984,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-17T08:32:41.823Z","etag":null,"topics":["api","beginner-friendly","graphql","hacktoberfest","pokeapi","pokemon"],"latest_commit_sha":null,"homepage":"https://pokeapi.co","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":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"pokeapi","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2014-12-04T10:17:17.000Z","updated_at":"2025-04-17T06:36:59.000Z","dependencies_parsed_at":"2023-12-15T08:24:14.694Z","dependency_job_id":"fd47f7a1-9307-4526-9bfc-f751202940f6","html_url":"https://github.com/PokeAPI/pokeapi","commit_stats":{"total_commits":1161,"total_committers":167,"mean_commits":6.952095808383233,"dds":0.6623600344530577,"last_synced_commit":"37a7f6be40de656c2beae78d24bb3f234b81bab4"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokeapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokeapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokeapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PokeAPI%2Fpokeapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PokeAPI","download_url":"https://codeload.github.com/PokeAPI/pokeapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249381175,"owners_count":21261252,"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","beginner-friendly","graphql","hacktoberfest","pokeapi","pokemon"],"created_at":"2024-08-01T22:02:33.181Z","updated_at":"2025-04-17T22:31:19.231Z","avatar_url":"https://github.com/PokeAPI.png","language":"Python","readme":"\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg height=\"200\" src=\"https://raw.githubusercontent.com/PokeAPI/media/master/logo/pokeapi.svg?sanitize=true\" alt=\"PokeAPI\"\u003e\n\n[![build status](https://img.shields.io/circleci/project/github/PokeAPI/pokeapi/master.svg)](https://circleci.com/gh/PokeAPI/pokeapi)\n[![data status](https://img.shields.io/circleci/build/github/PokeAPI/api-data?label=data)](https://github.com/PokeAPI/api-data)\n[![deploy status](https://img.shields.io/circleci/build/github/PokeAPI/deploy?label=deploy)](https://github.com/PokeAPI/deploy)\n[![License](https://img.shields.io/github/license/PokeAPI/pokeapi.svg)](https://github.com/PokeAPI/pokeapi/blob/master/LICENSE.md)\n[![Backers on Open Collective](https://opencollective.com/pokeapi/backers/badge.svg)](https://opencollective.com/pokeapi)\n[![Sponsors on Open Collective](https://opencollective.com/pokeapi/sponsors/badge.svg)](https://opencollective.com/pokeapi)\n\n\u003cbr/\u003e\n\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\nA RESTful API for Pokémon - [pokeapi.co](https://pokeapi.co)\n\n\u003e Beta GraphQL support is rolling out! Check out the [GraphQL paragraph](#graphql--) for more info.\n\n\n## Table of Contents\n\n- [Setup](#setup)\n- [Database setup](#database-setup)\n- [Docker and Compose](#docker-and-compose)\n- [GraphQL](#graphql)\n- [Kubernetes](#kubernetes)\n- [Wrappers](#wrappers)\n- [Donations](#donations)\n- [Join Us On Slack!](#join-us-on-slack)\n- [Contributing](#contributing)\n\n## Setup \u003ca id=\"setup\"\u003e\u003c/a\u003e \u0026nbsp; [![pyVersion310](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/download/releases/3.10/)\n\n- Download this source code into a working directory, be sure to use the flag `--recurse-submodules` to clone also our submodules.\n\n- Install the requirements using pip:\n\n    ```sh\n    make install\n    # This will install all the required packages and libraries for using PokeAPI\n    ```\n\n- Set up the local development environment using the following command:\n\n    ```sh\n    make setup\n    ```\n\n- Run the server on port `8000` using the following command:\n\n    ```sh\n    make serve\n    ```\n\n## Database setup\n\nTo build or rebuild the database by applying any CSV file update, run\n\n```sh\nmake build-db\n```\n\nVisit [localhost:8000/api/v2/](http://localhost:8000/api/v2/) to see the running API!\n\nEach time the `build-db` script is run, it will iterate over each table in the database, wipe it, and rewrite each row using the data found in data/v2/csv.\n\nIf you ever need to wipe the database use this command:\n\n```sh\nmake wipe-sqlite-db\n```\n\nIf the database schema has changed, generate any outstanding migrations and apply them\n\n```sh\nmake make-migrations\nmake migrate\n```\n\nRun `make help` to see all tasks.\n\n## Docker and Compose \u003ca id=\"docker-and-compose\"\u003e\u003c/a\u003e \u0026nbsp; [![docker hub](https://img.shields.io/docker/v/pokeapi/pokeapi?label=tag\u0026sort=semver)](https://hub.docker.com/r/pokeapi/pokeapi)\n\nThere is also a multi-container setup, managed by [Docker Compose V2](https://docs.docker.com/compose/). This setup allows you to deploy a production-like environment, with separate containers for each service, and is recommended if you need to simply spin up PokéAPI.\n\nStart everything by\n\n```sh\nmake docker-setup\n```\n\nIf you don't have `make` on your machine you can use the following commands\n\n```sh\ndocker compose up -d\ndocker compose exec -T app python manage.py migrate --settings=config.docker-compose\ndocker compose exec -T app sh -c 'echo \"from data.v2.build import build_all; build_all()\" | python manage.py shell --settings=config.docker-compose'\n```\n\nBrowse [localhost/api/v2/](http://localhost/api/v2/) or [localhost/api/v2/pokemon/bulbasaur/](http://localhost/api/v2/pokemon/bulbasaur/) on port `80`.\n\nTo rebuild the database and apply any CSV file updates, run\n\n```sh\nmake docker-build-db\n```\n\nIf the database schema has changed, generate the migrations and apply those\n\n```sh\nmake docker-make-migrations\nmake docker-migrate\n```\n\n## GraphQL \u003ca id=\"graphql\"\u003e\u003c/a\u003e \u0026nbsp; \u003ca href=\"ttps://github.com/hasura/graphql-engine\"\u003e\u003cimg height=\"29px\" src=\"https://graphql-engine-cdn.hasura.io/img/powered_by_hasura_blue.svg\"/\u003e\u003c/a\u003e\n\nWhen you start PokéAPI with the above Docker Compose setup, an [Hasura Engine](https://github.com/hasura/graphql-engine) server is started as well. It's possible to track all the PokeAPI tables and foreign keys by simply\n\n```sh\n# hasura cli needs to be installed and available in your $PATH: https://hasura.io/docs/latest/graphql/core/hasura-cli/install-hasura-cli.html\n# hasura cli's version has to greater than v2.0.8\nmake hasura-apply\n```\n\nWhen finished browse http://localhost:8080 and you will find the admin console. The GraphQL endpoint will be hosted at http://localhost:8080/v1/graphql.\n\nA free public GraphiQL console is browsable at the address https://beta.pokeapi.co/graphql/console/. The relative GraphQL endpoint is accessible at https://beta.pokeapi.co/graphql/v1beta\n\nA set of examples is provided in the directory [/graphql/examples](./graphql/examples) of this repository.\n\n## Kubernetes \u003ca id=\"kubernetes\"\u003e\u003c/a\u003e \u0026nbsp; [![Build Docker image and create k8s with it](https://github.com/PokeAPI/pokeapi/actions/workflows/docker-k8s.yml/badge.svg)](https://github.com/PokeAPI/pokeapi/actions/workflows/docker-k8s.yml)\n\n[Kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/) files are provided in the folder https://github.com/PokeAPI/pokeapi/tree/master/Resources/k8s/kustomize/base/. Create and change your secrets:\n\n```sh\ncp Resources/k8s/kustomize/base/secrets/postgres.env.sample Resources/k8s/kustomize/base/secrets/postgres.env\ncp Resources/k8s/kustomize/base/secrets/graphql.env.sample Resources/k8s/kustomize/base/secrets/graphql.env\ncp Resources/k8s/kustomize/base/config/pokeapi.env.sample Resources/k8s/kustomize/base/config/pokeapi.env\n# Edit the newly created files\n```\n\nConfigure `kubectl` to point to a cluster and then run the following commands to start a PokéAPI service.\n\n```sh\nkubectl apply -k Resources/k8s/kustomize/base/\nkubectl config set-context --current --namespace pokeapi # (Optional) Set pokeapi ns as the working ns\n# Wait for the cluster to spin up\nkubectl exec --namespace pokeapi deployment/pokeapi -- python manage.py migrate --settings=config.docker-compose # Migrate the DB\nkubectl exec --namespace pokeapi deployment/pokeapi -- sh -c 'echo \"from data.v2.build import build_all; build_all()\" | python manage.py shell --settings=config.docker-compose' # Build the db\nkubectl wait --namespace pokeapi --timeout=120s --for=condition=complete job/load-graphql # Wait for Graphql configuration job to finish\n```\n\nThis k8s setup creates all k8s resources inside the _Namespace_ `pokeapi`, run `kubectl delete namespace pokeapi` to delete them. It also creates a _Service_ of type `LoadBalancer` which is exposed on port `80` and `443`. Data is persisted on `12Gi` of `ReadWriteOnce` volumes.\n\n## Wrappers\n\n| Official wrapper | Repository | Features |\n| --- | --- | --- |\n| Node server-side | [PokeAPI/pokedex-promise-v2](https://github.com/PokeAPI/pokedex-promise-v2) | _Auto caching_ |\n| Browser client-side | [PokeAPI/pokeapi-js-wrapper](https://github.com/PokeAPI/pokeapi-js-wrapper) | _Auto caching_, _Image caching_ |\n| Java/Kotlin | [PokeAPI/pokekotlin](https://github.com/PokeAPI/pokekotlin) | |\n| Python 2/3 | [PokeAPI/pokepy](https://github.com/PokeAPI/pokepy) | _Auto caching_ |\n| Python 3 | [PokeAPI/pokebase](https://github.com/PokeAPI/pokebase) | _Auto caching_, _Image caching_ |\n\n|Wrapper|Repository|Features|\n|---|---|---|\n|.Net Standard |[mtrdp642/PokeApiNet](https://github.com/mtrdp642/PokeApiNet)|Auto caching |\n|Dart|[prathanbomb/pokedart](https://github.com/prathanbomb/pokedart)| |\n|Go|[mtslzr/pokeapi-go](https://github.com/mtslzr/pokeapi-go)|Auto caching |\n|PHP |[lmerotta/phpokeapi](https://github.com/lmerotta/phpokeapi)|Auto caching, lazy loading |\n|PowerShell|[Celerium/PokeAPI-PowerShellWrapper](https://github.com/Celerium/PokeAPI-PowerShellWrapper)| |\n|Python|[beastmatser/aiopokeapi](https://github.com/beastmatser/aiopokeapi)|Auto caching, asynchronous |\n|Ruby|[rdavid1099/poke-api-v2](https://github.com/rdavid1099/poke-api-v2)| |\n|Rust|[lunik1/pokerust](https://gitlab.com/lunik1/pokerust)|Auto caching |\n|Scala |[juliano/pokeapi-scala](https://github.com/juliano/pokeapi-scala)|Auto caching |\n|Spring Boot |[dlfigueira/spring-pokeapi](https://github.com/dlfigueira/spring-pokeapi)|Auto caching |\n|Swift |[kinkofer/PokemonAPI](https://github.com/kinkofer/PokemonAPI)| |\n|Typescript server-side/client-side|[Gabb-c/Pokenode-ts](https://github.com/Gabb-c/pokenode-ts)|Auto caching |\n\n## Donations\n\nHelp to keep PokéAPI running! If you're using PokéAPI as a teaching resource or for a project, consider sending us a donation to help keep the service up. We get 1+ billion requests a month!\n\nThank you to all our backers! [Become a backer](https://opencollective.com/pokeapi#backer)\n\n\u003ca href=\"https://opencollective.com/pokeapi#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/pokeapi/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n## Join Us On Slack!\n\n\u003e **Warning**\n\u003e Currently no maintainer has enough free time to support the community on Slack. Our Slack is in an unmaintained status.\n\nHave a question or just want to discuss new ideas and improvements? Hit us up on Slack. ~~Consider talking with us here before creating a new issue.~~\nThis way we can keep issues here a bit more organized and helpful in the long run. Be excellent to each other :smile:\n\n[Sign up](https://join.slack.com/t/pokeapi/shared_invite/zt-2ampo6her-_tHSI3uOS65WzGypt7Y96w) easily!\n\nOnce you've signed up visit [PokéAPI on Slack](https://pokeapi.slack.com)\n\n## Contributing\n\nThis project exists thanks to all the people who [contribute](https://github.com/PokeAPI/pokeapi/blob/master/CONTRIBUTING.md)\n\n\u003ca href=\"graphs/contributors\"\u003e\u003cimg src=\"https://opencollective.com/pokeapi/contributors.svg?width=890\" /\u003e\u003c/a\u003e\n\nAll contributions are welcome: bug fixes, data contributions, and recommendations.\n\nPlease see the [issues on GitHub](https://github.com/PokeAPI/pokeapi/issues) before you submit a pull request or raise an issue, someone else might have beat you to it.\n\nTo contribute to this repository:\n\n- [Fork the project to your own GitHub profile](https://help.github.com/articles/fork-a-repo/)\n\n- Download the forked project using git clone:\n\n    ```sh\n    git clone --recurse-submodules git@github.com:\u003cYOUR_USERNAME\u003e/pokeapi.git\n    ```\n\n- Create a new branch with a descriptive name:\n\n    ```sh\n    git checkout -b my_new_branch\n    ```\n\n- Write some code, fix something, and add a test to prove that it works. *No pull request will be accepted without tests passing, or without new tests if new features are added.*\n\n- Commit your code and push it to GitHub\n\n- [Open a new pull request](https://help.github.com/articles/creating-a-pull-request/) and describe the changes you have made.\n\n- We'll accept your changes after review.\n\nSimple!\n","funding_links":["https://opencollective.com/pokeapi"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPokeAPI%2Fpokeapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPokeAPI%2Fpokeapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPokeAPI%2Fpokeapi/lists"}