hsuan1117's blog

By hsuan1117, history, 7 weeks ago, In English

Recently, I am using CMS (Contest Management System) with Codeforces API, however, calling the API wasn't that convenient for me.
So I just developed a python Codeforces API wrapper for python developers. The module implemented all the API endpoint in the API documents here, also, the library provided multiple ways to get data.
Take a look at this example.

from CodeforcesAPI import Codeforces

cf = Codeforces(api_key='hi',secret='secret')

You can simply get users in contest, and get other information by using chaining methods.
Moreover, the library uses the "dot-env loader", you can just place your secret information inside .env file instead of writing a lot in the codes.

To install the module, just use the pip tool

pip install CodeforcesAPI

Here is the Github Project: Github
And here is the document of the library: Document
The module is released under MIT license, I think it'll be useful for someone needing it.
I'm glad to any suggestions, any issues, requests are welcomed.

  • Vote: I like it
  • +4
  • Vote: I do not like it