Async Python client for the CTFd API (v1).
Documentation · PyPI · Changelog
uv add ctfd-api
# or
pip install ctfd-apiRequires Python 3.13+.
import asyncio
from ctfd import CTFdClient
async def main():
async with CTFdClient('https://my-ctf.example.com', token='ctfd_...') as ctfd:
me = await ctfd.users.me()
async for challenge in ctfd.challenges.iter():
print(challenge.name, challenge.value)
asyncio.run(main())Get a token from Profile → API Access Tokens on your CTFd instance.
uv sync # install deps + dev tools
uv run pre-commit install # install git hooks
uv run pytest # run tests
uv run ruff check ctfd # lint
uv run mypy # type-check
uv run --group docs mkdocs serve # live docs preview