{"id":28636017,"url":"https://github.com/r-priyam/fastapi-coc.py","last_synced_at":"2026-05-02T05:36:17.168Z","repository":{"id":36968006,"uuid":"442997334","full_name":"r-priyam/fastapi-coc.py","owner":"r-priyam","description":"A simple FastAPI app to demonstrate the use with coc.py","archived":false,"fork":false,"pushed_at":"2024-04-07T23:39:13.000Z","size":744,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-08T01:04:38.998Z","etag":null,"topics":["clash-of-clans","coc","fastapi","python","python3"],"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/r-priyam.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-12-30T07:14:13.000Z","updated_at":"2024-04-15T03:23:50.405Z","dependencies_parsed_at":"2023-10-16T12:54:40.433Z","dependency_job_id":"dc111d27-ca4e-4098-ad6c-90a8f8b0f83b","html_url":"https://github.com/r-priyam/fastapi-coc.py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r-priyam/fastapi-coc.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-priyam%2Ffastapi-coc.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-priyam%2Ffastapi-coc.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-priyam%2Ffastapi-coc.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-priyam%2Ffastapi-coc.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-priyam","download_url":"https://codeload.github.com/r-priyam/fastapi-coc.py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-priyam%2Ffastapi-coc.py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259513040,"owners_count":22869541,"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":["clash-of-clans","coc","fastapi","python","python3"],"created_at":"2025-06-12T17:36:13.011Z","updated_at":"2026-05-02T05:36:17.119Z","avatar_url":"https://github.com/r-priyam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n## **A simple [FastAPI](https://github.com/tiangolo/fastapi) app to demonstrate the use with [coc.py](https://github.com/mathsman5133/coc.py)**\n\n\u003c/div\u003e\n\n## Inroduction\n\nThis simple application uses the `coc.py` library to interact with `Clash of Clans` in game API and the `FastAPI` framework to server the data using `jinja2` templates.\n\n## Features\n\n- 📄 Jinja2 templates\n- ✒️ Fully type-safe code (checked with [`Pyright`](https://github.com/microsoft/pyright)).\n- 🚀 It actually works!\n\n## Important Links\n\n- [FastAPI Documentation](https://fastapi.tiangolo.com/)\n- [coc.py Documentation](https://cocpy.readthedocs.io/en/latest/)\n- [Starlette's docs](https://www.starlette.io/templates/)\n\n## Before you start\n\nPlease make sure that you have these requirements ready:\n\n- Python **3.9+**\n- Poetry, for dependency management. Follow the [installation instructions](https://python-poetry.org/docs/#installation) to install it.\n- GIT, for version control and also to clone this repo. Follow [installation instructions](https://git-scm.com/) to install it.\n- Nothing else but however basic knowledge of `Python` and `FastAPI`.\n\n## Getting Started\n\n1. Clone the project using `git clone https://github.com/r-priyam/fastapi-coc.py.git`\n2. Run `poetry install` to install the dependencies.\n3. Rename `.env.example` to `.env` and fill in the required values.\n    - `COC_EMAIL`: Your email from `https://developer.clashofclans.com/`\n    - `COC_PASSWORD`: Your password from `https://developer.clashofclans.com/`\n    - `COC_KEY_NAME`: Name to create API key with.\n\nAll set now, turn the 💡 on by running - `poetry run task dev`. Once application started, visit - `http://127.0.0.1:8000/player/2pp` in your browser and done. Change player tag to whatever you want to and it will display that player information.\n\nIf you have any questions or suggestions, please feel free to open an issue [here](https://github.com/r-priyam/fastapi-coc.py/issues/new).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-priyam%2Ffastapi-coc.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-priyam%2Ffastapi-coc.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-priyam%2Ffastapi-coc.py/lists"}