Skip to main content

Build Status PyPI

hackerrank

Python library for the HackerRank for Work API.

Installation

pip install hackerrank

This is tested on Python 3.13+.

Getting Started

Generate an API token from the HackerRank for Work tokens page and pass it as api_key:

"""Example usage."""

import sys

from hackerrank.client import HackerRank

client = HackerRank(api_key="your-api-key")
for test in client.tests.list().data:
    _ = sys.stdout.write(test.name)
interview = client.interviews.create(title="My Interview")
_ = sys.stdout.write(interview.url)

Updating private notes

Use client.questions.update_internal_notes(question_id=..., internal_notes=...) to change private interviewer notes. The same operation is available on AsyncHackerRank. It reads current fields, skips equivalent notes, resends required fields unchanged, and reads back the saved question. It raises ValueError if required fields are absent or verification finds changes to other modeled fields. Pass notes_equal to supply a comparison callback for server serialization differences. The default compares exact text and treats absent notes as empty. HTML comparison policies and question-type restrictions remain with the caller.

HTTPX2 transports

HTTPX remains the default client family. To opt in to HTTPX2, construct the HTTPX2 transport explicitly and pass it to the client. The standard hackerrank installation includes both client families.

"""Configure HackerRank to use HTTPX2."""

import httpx2

from hackerrank.client import HackerRank
from hackerrank.transports import HTTPX2Transport

transport = HTTPX2Transport(timeout=httpx2.Timeout(timeout=10))
with HackerRank(api_key="your-api-key", transport=transport) as client:
    tests = client.tests.list()

Use AsyncHTTPX2Transport with AsyncHackerRank for asynchronous calls. The timeout argument accepts an HTTPX2 timeout object or a number of seconds. Existing HTTPX users can keep their current configuration, but HTTPX2 transports require timeout objects from HTTPX2 when passing them across the package boundary. Migrating to HTTPX2 only requires selecting the new transport. HackerRank client methods and returned models are unchanged.

Full Documentation

See the full documentation.

Metadata

Release files for hackerrank 2026.10.30.1

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

Source distribution (sdist)

Source distribution for hackerrank 2026.10.30.1
File Size Uploaded Provenance Actions
hackerrank-2026.10.30.1.tar.gz 144.2 kB With provenance Details for hackerrank-2026.10.30.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hackerrank 2026.10.30.1
File Interpreter ABI Platform Actions
hackerrank-2026.10.30.1-py3-none-any.whl Python 3 none any Details for hackerrank-2026.10.30.1-py3-none-any.whl

Total release size: 197.5 kB

Release files / hackerrank-2026.10.30.1.tar.gz

Download URL hackerrank-2026.10.30.1.tar.gz
Size 144.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f02929e27a3397535301c12b32a13e79acddde7c92428921e5757ca4dae63495
BLAKE2b-256 checksum
How to use checksums
0f81f7abc11b44622583ab76963e6638d32a91f384b7379ac2bab2054223fb18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / hackerrank-2026.10.30.1-py3-none-any.whl

Download URL hackerrank-2026.10.30.1-py3-none-any.whl
Size 53.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d76e8b0c1f153ec594a6f5bf7358b838ea7757932cdecf3b96c2be834e57c244
BLAKE2b-256 checksum
How to use checksums
7a3a156e4056c49c6438805450f2522589ce55d7beb2dce5fb39afa9a91506b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for hackerrank 2026.10.30.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hackerrank-2026.10.30.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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