Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Repository files navigation

codechef_client

CodeChef API to support different applications.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

importcodechef_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

importcodechef_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ importprint_functionimporttimeimportcodechef_clientfromcodechef_client.restimportApiExceptionfrompprintimportpprint# Configure OAuth2 access token for authorization: codechef_authcodechef_client.configuration.access_token='YOUR_ACCESS_TOKEN'# create an instance of the API classapi_instance=codechef_client.ContestProblemsApi()
problem_code='problem_code_example'# str | Problem code of the problem, eg. SALARYcontest_code='contest_code_example'# str | Contest code of the contest, eg. PRACTICE, COOK97, JAN17fields='fields_example'# str | Possible fields are- problemCode, author, problemName, languagesSupported, sourceSizeLimit, dateAdded, challengeType, maxTimeLimit, successfulSubmissions, body, totalSubmissions, partialSubmissions, tags. Multiple fields can be entered using comma. (optional)try:
# Get details of a problem.api_response=api_instance.contests_contest_code_problems_problem_code_get(problem_code, contest_code, fields=fields)
pprint(api_response)
exceptApiExceptionase:
print("Exception when calling ContestProblemsApi->contests_contest_code_problems_problem_code_get: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to https://api.codechef.com

ClassMethodHTTP requestDescription
ContestProblemsApicontests_contest_code_problems_problem_code_getGET /contests/{contestCode}/problems/{problemCode}Get details of a problem.
ContestsApicontests_contest_code_getGET /contests/{contestCode}Get contest details.
ContestsApicontests_getGET /contestsGet the list of contests.
CountriesApicountry_getGET /countryGet the list of countries on codechef.
IDEApiide_run_postPOST /ide/runRuns a code submitted by user.
IDEApiide_status_getGET /ide/statusGet status of submitted code.
InstitutionsApiinstitution_getGET /institutionGet the list of institutions on codechef.
LanguagesApilanguage_getGET /languageGet the list of languages on codechef.
ProblemsApiproblems_category_name_getGET /problems/{categoryName}Get the list of problems for given categoryName.
RankingsApirankings_contest_code_getGET /rankings/{contestCode}Return ranklist for a particular contest.
RatingsApiratings_contest_type_getGET /ratings/{contestType}Return ratinglist for a particular contest type.
SetsApisets_add_postPOST /sets/addAdds set to the user's account to whom the access token being used belongs.
SetsApisets_delete_deleteDELETE /sets/deleteDeletes set from the user's account to whom the access token belongs.
SetsApisets_getGET /sets/Get set details for logged in user
SetsApisets_members_add_postPOST /sets/members/addAdds set members to an existing set of the user to whom the access token belongs.
SetsApisets_members_delete_deleteDELETE /sets/members/deleteRemoves members belonging to a set.
SetsApisets_members_get_getGET /sets/members/getGet set details for particular sets of the logged in user
SetsApisets_update_putPUT /sets/updateUpdates set of the logged in user's account.
SubmissionApisubmissions_getGET /submissions/Get submissions for particular user, problemCode, result and year.
SubmissionApisubmissions_submission_id_getGET /submissions/{submissionId}Get details of a submission.
TagsApitags_problems_getGET /tags/problemsGet list of tags for a given problem.
TodoApitodo_add_postPOST /todo/addAdds a problem to todo list.
TodoApitodo_delete_all_deleteDELETE /todo/delete/allDeletes all the problems added to the todo list.
TodoApitodo_delete_deleteDELETE /todo/delete/Deletes a problem added to the todo list.
TodoApitodo_problems_getGET /todo/problemsGets problems listed in todo.
UsersApiusers_getGET /usersGet the list of users maximum 20.
UsersApiusers_me_getGET /users/meFetches all the details of logged-in user.
UsersApiusers_username_getGET /users/{username}Fetches all the details of a user.

Documentation For Models

Documentation For Authorization

codechef_auth

Author

About

[WIP] python client library for codechef api, generated with swagger

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages