A simple Python wrapper for the CTFTime API that provides an asynchronous interface to retrieve CTF event and team information.
- 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.
Install via pip:
pip install ctftime_apiCreate a client to interact with the CTFTime API. For example, to get the top teams for the current year:
importasynciofromctftime_api.clientimportCTFTimeClientasyncdefmain():
client=CTFTimeClient()
top_teams=awaitclient.get_top_teams_per_year()
forteamintop_teams:
print(f"{team.name} (ID: {team.id}) - Points: {team.points}")
awaitclient.close()
asyncio.run(main())For more detailed examples, check the examples directory.
Full API documentation is available at https://jotonedev.github.io/ctftime_api.
This project is licensed under the GNU General Public License v3 or later (GPLv3+).
This project is released under the GPL 3.0 or later license.