Skip to main content

ctftime_api

PyPI - Python Version PyPI - Status PyPI - Version

A simple Python wrapper for the CTFTime API that provides an asynchronous interface to retrieve CTF event and team information.

Features

  • Asynchronous: Utilize Python's async/await for non-blocking API requests.
  • Type Safe: Fully type annotated using Pydantic models.
  • Modular: Organized into client and models modules for easy maintenance and extension.
  • Tested: Includes comprehensive unit tests in the tests directory.

Installation

Install via pip:

pip install ctftime_api

Usage

Create a client to interact with the CTFTime API. For example, to get the top teams for the current year:

import asyncio
from ctftime_api.client import CTFTimeClient


async def main():
    client = CTFTimeClient()
    top_teams = await client.get_top_teams_per_year()
    for team in top_teams:
        print(f"{team.name} (ID: {team.id}) - Points: {team.points}")
    await client.close()


asyncio.run(main())

For more detailed examples, check the examples directory.

Documentation

Full API documentation is available at https://jotonedev.github.io/ctftime_api.

Contributing

This project is licensed under the GNU General Public License v3 or later (GPLv3+).

Additional Resources

License

This project is released under the GPL 3.0 or later license.

Metadata

Release files for ctftime-api 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ctftime-api 0.3.0
File Size Uploaded Provenance Actions
ctftime_api-0.3.0.tar.gz 640.0 kB With provenance Details for ctftime_api-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ctftime-api 0.3.0
File Interpreter ABI Platform Actions
ctftime_api-0.3.0-py3-none-any.whl Python 3 none any Details for ctftime_api-0.3.0-py3-none-any.whl

Total release size: 662.1 kB

Release files / ctftime_api-0.3.0.tar.gz

Download URL ctftime_api-0.3.0.tar.gz
Size 640.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0e0a8dabc85ad8e4b2936bfb058a0341ffa895735293bd75f2c5a66e5ea48f9a
BLAKE2b-256 checksum
How to use checksums
add03b2dc52e7ebdbee25eec32857377626a2411835cd7fa386218ff63836799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / ctftime_api-0.3.0-py3-none-any.whl

Download URL ctftime_api-0.3.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9afce0a13334b347ab7b1abfbac8dfd4d4ed0974cfa583bf5f22405d39d73d9
BLAKE2b-256 checksum
How to use checksums
fbdb788e1a7ed09359672fa8d86afd9155d5b3d8c07c00dd16900ada856dd1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for ctftime-api 0.3.0

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.

Select from 2 files

Attestation for ctftime_api-0.3.0.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 Oct 26, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page