onlinejudge.service.hackerrank module

the module for HackerRank (https://www.hackerrank.com/)

class onlinejudge.service.hackerrank.HackerRankProblem(contest_slug, challenge_slug)[source]

Bases: onlinejudge.type.Problem

download_sample_cases(*, session=None)[source]
Raises

NotImplementedError

Return type

List[TestCase]

download_system_cases(*, session=None)[source]
Raises

NotLoggedInError

Return type

List[TestCase]

classmethod from_url(url)[source]
Return type

Optional[HackerRankProblem]

get_available_languages(*, session=None)[source]
Return type

List[Language]

get_service()[source]
Return type

HackerRankService

get_url()[source]
Return type

str

submit_code(code, language_id, *, filename=None, session=None)[source]
Raises
Return type

Submission

class onlinejudge.service.hackerrank.HackerRankService[source]

Bases: onlinejudge.type.Service

classmethod from_url(url)[source]
Return type

Optional[HackerRankService]

get_name()[source]

example:

  • AtCoder

  • Codeforces

  • PKU JudgeOnline

Note

If you want something like identifier (e.g. atcoder, codeforces or poj), you can use a domain obtained from get_url().

Return type

str

get_url()[source]
Return type

str

get_url_of_login_page()[source]
Return type

str

is_logged_in(*, session=None)[source]
Return type

bool