Skip to main content

Codeforces API License Stars Forks Issues Publish to PyPI and create Release. Generate wiki Downloads Codestyle

Installing

With pip:

pip install CodeforcesApiPy

From the repository:

git clone https://github.com/VadVergasov/CodeforcesApiPy.git
cd codeforcesapipy
python3 setup.py install

Using

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.

Types

All types are defined in types.py. They are all completely in line with the Codeforces API's definition of the types

Methods

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 contest_hacks and user.actions to user_actions.

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.

Wiki

Here is link to the wiki for more details.

Examples

Here are some examples of using this library:

  • A2OJ by subodhk01 - allows you to look at your ladder progress.
  • cf_utils by xennygrimmato - allows you to find common solved problems.

Release files for CodeforcesApiPy 2.0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CodeforcesApiPy 2.0.12
File Size Uploaded
codeforcesapipy-2.0.12.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CodeforcesApiPy 2.0.12
File Interpreter ABI Platform
CodeforcesApiPy-2.0.12-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 54.1 kB

Release files / codeforcesapipy-2.0.12.tar.gz

Download URL codeforcesapipy-2.0.12.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ea3ec52906864b6f4673ddd0b783ec758b69e1b814143455f5e4ab584570c0b9
BLAKE2b-256 checksum
How to use checksums
f288497f9b7dfea4b71cfd4e2adba500c1e7f8f13e85eb2644285a417bbd58f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / CodeforcesApiPy-2.0.12-py2.py3-none-any.whl

Download URL CodeforcesApiPy-2.0.12-py2.py3-none-any.whl
Size 26.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5f5e0bc67b7b70b8fe211a52b961e1da06ec99f53b2e232f5b1dad84dedc08b7
BLAKE2b-256 checksum
How to use checksums
b521a4ac6763681b36495ef6a6ea1473be906803e361dfb00d3f812ce546e0f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

2.0.12 This release

2 release files

2.0.11

1 release file

2.0.10

1 release file

2.0.9

1 release file

2.0.8

1 release file

2.0.7

1 release file

2.0.6

1 release file

2.0.5

1 release file

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.6.0

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.1

1 release file

1.4.0

1 release file

1.3.3

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.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