ctfd.py
Async Python client for the CTFd API (v1).
Documentation · PyPI · Changelog
Installation
uv add ctfd-api
# or
pip install ctfd-api
Requires Python 3.13+.
Quick start
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.
Dev setup
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
License
Metadata
Release files for ctfd-api 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ctfd_api-0.2.2.tar.gz | 31.1 kB | With provenance | Details for ctfd_api-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ctfd_api-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for ctfd_api-0.2.2-py3-none-any.whl |
Total release size: 73.3 kB
Release files / ctfd_api-0.2.2.tar.gz
| Download URL | ctfd_api-0.2.2.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9d240eeb73ecd200f4c07e0fdfd1b2803b4ad399ffdc98c2a326403d8bbb474
|
|
BLAKE2b-256 checksum How to use checksums |
0f8db16e7be4c79eec004fee6cd00b59c567873653b3337d50228ab7196fe58e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logRelease files / ctfd_api-0.2.2-py3-none-any.whl
| Download URL | ctfd_api-0.2.2-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b29c6f4070416d8097ca47519b7c77a4d58653ebf106d9167fb6863c741a39da
|
|
BLAKE2b-256 checksum How to use checksums |
f7a0fc3eae8e54f142e0aa7c1fbcc2e1979793772e6240a4f5fd9ad2d91ae0c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logSecurity for ctfd-api 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ctfd_api-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.