Implementation of codeforces.com API
pip install CodeforcesApiPy
From the repository:
git clone https://github.com/VadVergasov/CodeforcesApiPy.git cd codeforcesapipy python3 setup.py install
import codeforces_api cf_api = codeforces_api.CodeforcesApi(api_key, secret) # Authorized access to api. anonim_cf_api = codeforces_api.CodeforcesApi() # Unauthorized access to api. parser = codeforces_api.CodeforcesParser() # Create parser.
All types are defined in types.py. They are all completely in line with the Codeforces API's definition of the types
All API methods are located in the CodeforcesAPI class. They are renamed to follow common Python naming conventions. E.g.
contest.hacks is renamed to
Transferring to 2 version
In the second version, all objects are represented as a class, so if you want to get a handle of the user you need to do like this: user.handle. You can read about all fields on Codeforces API objects.
Here is link to the wiki for more details.
Here are some examples of using this library:
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size CodeforcesApiPy-2.0.8.tar.gz (11.5 kB)||File type Source||Python version None||Upload date||Hashes View|