CTFTime API wrapper
Project description
ctftime_api
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d82ce2f314ff90b966080e47dd6344d9e3ca4ab47e60c83f04760e380d2e99e
|
|
| MD5 |
2d2693a3e3205cb9a816bef7a466f39c
|
|
| BLAKE2b-256 |
9d62a3e7a77ccf6c1544e68f35c68f923d156ef25fd2d2d463d7517c4a2f5450
|
Provenance
The following attestation bundles were made for ctftime_api-0.2.0.tar.gz:
Publisher:
publish.yml on jotonedev/ctftime_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctftime_api-0.2.0.tar.gz -
Subject digest:
0d82ce2f314ff90b966080e47dd6344d9e3ca4ab47e60c83f04760e380d2e99e - Sigstore transparency entry: 511834068
- Sigstore integration time:
-
Permalink:
jotonedev/ctftime_api@8b02e3a9840fa57298edf5e90ee9748552b9c433 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jotonedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8b02e3a9840fa57298edf5e90ee9748552b9c433 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554461d0ab5a84b54f366b61b49e822f95cb351911833f50eed4aa632e3b9c38
|
|
| MD5 |
0aa7751aa6d7e3ccb2e6ae350add77cd
|
|
| BLAKE2b-256 |
c144f69b4814831d4555bcfe9e1d05353c58b6f614af3231fa56a7644ba7bbe0
|
Provenance
The following attestation bundles were made for ctftime_api-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on jotonedev/ctftime_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ctftime_api-0.2.0-py3-none-any.whl -
Subject digest:
554461d0ab5a84b54f366b61b49e822f95cb351911833f50eed4aa632e3b9c38 - Sigstore transparency entry: 511834095
- Sigstore integration time:
-
Permalink:
jotonedev/ctftime_api@8b02e3a9840fa57298edf5e90ee9748552b9c433 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/jotonedev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8b02e3a9840fa57298edf5e90ee9748552b9c433 -
Trigger Event:
push
-
Statement type: