Skip to main content

CTFTime API wrapper

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctftime_api-0.2.0.tar.gz (577.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ctftime_api-0.2.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file ctftime_api-0.2.0.tar.gz.

File metadata

  • Download URL: ctftime_api-0.2.0.tar.gz
  • Upload date:
  • Size: 577.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctftime_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0d82ce2f314ff90b966080e47dd6344d9e3ca4ab47e60c83f04760e380d2e99e
MD5 2d2693a3e3205cb9a816bef7a466f39c
BLAKE2b-256 9d62a3e7a77ccf6c1544e68f35c68f923d156ef25fd2d2d463d7517c4a2f5450

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctftime_api-0.2.0.tar.gz:

Publisher: publish.yml on jotonedev/ctftime_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ctftime_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ctftime_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ctftime_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 554461d0ab5a84b54f366b61b49e822f95cb351911833f50eed4aa632e3b9c38
MD5 0aa7751aa6d7e3ccb2e6ae350add77cd
BLAKE2b-256 c144f69b4814831d4555bcfe9e1d05353c58b6f614af3231fa56a7644ba7bbe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ctftime_api-0.2.0-py3-none-any.whl:

Publisher: publish.yml on jotonedev/ctftime_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page