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.

Release files for ctftime-api 0.2.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.2.0
File Size Uploaded
ctftime_api-0.2.0.tar.gz 577.6 kB Details

Built distribution (wheel)

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

Total release size: 599.8 kB

Release files / ctftime_api-0.2.0.tar.gz

Download URL ctftime_api-0.2.0.tar.gz
Size 577.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0d82ce2f314ff90b966080e47dd6344d9e3ca4ab47e60c83f04760e380d2e99e
BLAKE2b-256 checksum
How to use checksums
9d62a3e7a77ccf6c1544e68f35c68f923d156ef25fd2d2d463d7517c4a2f5450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 13, 2025.

Transparency log

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

Download URL ctftime_api-0.2.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
554461d0ab5a84b54f366b61b49e822f95cb351911833f50eed4aa632e3b9c38
BLAKE2b-256 checksum
How to use checksums
c144f69b4814831d4555bcfe9e1d05353c58b6f614af3231fa56a7644ba7bbe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 13, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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