coderpad-py¶
Installation¶
$ pip install coderpad-py
This is tested on Python 3.12+.
Usage¶
"""Example usage."""
import sys
from coderpad.client import CoderPad
client = CoderPad(api_key="your-api-key")
pad = client.pads.create(title="Interview", language="python")
_ = sys.stdout.write(pad.title)
for listed_pad in client.pads.list():
_ = sys.stdout.write(listed_pad.title)
org = client.organization.get()
_ = sys.stdout.write(org.organization_name)
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 coderpad-py installation includes both client families.
"""Configure CoderPad to use HTTPX2."""
import sys
import httpx2
from coderpad.client import CoderPad
from coderpad.transports import HTTPX2Transport
transport = HTTPX2Transport(timeout=httpx2.Timeout(timeout=10))
with CoderPad(api_key="your-api-key", transport=transport) as client:
_ = sys.stdout.write(client.base_url)
Use AsyncHTTPX2Transport with AsyncCoderPad for asynchronous calls.
The limits, proxy and timeout arguments passed to these transports accept HTTPX2 configuration objects.
Do not pass equivalent httpx objects across the package boundary.
If the Screen API should also use HTTPX2, pass a separate HTTPX2 transport as screen_transport.
Existing HTTPX users do not need to change anything. Migrating to HTTPX2 only requires selecting the new transport. The CoderPad client methods and returned models are unchanged.
See the API Reference for full usage details, including the exception hierarchy.
Reference¶
- API Reference
LanguagesNamespaceUserNamespacePadsNamespaceQuestionVariantsNamespaceQuestionsNamespaceOrganizationPadsNamespaceOrganizationQuestionsNamespaceOrganizationUsersNamespaceOrganizationNamespaceCoderPadAsyncLanguagesNamespaceAsyncUserNamespaceAsyncPadsNamespaceAsyncQuestionVariantsNamespaceAsyncQuestionsNamespaceAsyncOrganizationPadsNamespaceAsyncOrganizationQuestionsNamespaceAsyncOrganizationUsersNamespaceAsyncOrganizationNamespaceAsyncCoderPadScreenCampaignsNamespaceScreenTestsNamespaceScreenTestsNamespace.list()ScreenTestsNamespace.all()ScreenTestsNamespace.get()ScreenTestsNamespace.cancel()ScreenTestsNamespace.resend()ScreenTestsNamespace.delete()ScreenTestsNamespace.ai_assist_conversations()ScreenTestsNamespace.project_archive()ScreenTestsNamespace.report()ScreenTestsNamespace.report_json()
ScreenQuestionsNamespaceScreenTemporaryFilesNamespaceScreenWebhookNamespaceScreenNamespaceAsyncScreenCampaignsNamespaceAsyncScreenTestsNamespaceAsyncScreenTestsNamespace.list()AsyncScreenTestsNamespace.all()AsyncScreenTestsNamespace.get()AsyncScreenTestsNamespace.cancel()AsyncScreenTestsNamespace.resend()AsyncScreenTestsNamespace.delete()AsyncScreenTestsNamespace.ai_assist_conversations()AsyncScreenTestsNamespace.project_archive()AsyncScreenTestsNamespace.report()AsyncScreenTestsNamespace.report_json()
AsyncScreenQuestionsNamespaceAsyncScreenTemporaryFilesNamespaceAsyncScreenWebhookNamespaceAsyncScreenNamespaceScreenCampaignScreenInvitationScreenInvitationResultScreenTestQuestionScreenQuestionWarningScreenAIReviewScreenRubricCriterionResultScreenRubricCriterionResult.labelScreenRubricCriterionResult.descriptionScreenRubricCriterionResult.skillScreenRubricCriterionResult.outcomeScreenRubricCriterionResult.max_pointsScreenRubricCriterionResult.awarded_pointsScreenRubricCriterionResult.result_messageScreenRubricCriterionResult.result_overridden_by_recruiterScreenRubricCriterionResult.review_modeScreenRubricCriterionResult.ai_review
ScreenRubricResultScreenTestReportCaseResultScreenTestReportCaseResult.keyScreenTestReportCaseResult.labelScreenTestReportCaseResult.skillScreenTestReportCaseResult.outcomeScreenTestReportCaseResult.outputScreenTestReportCaseResult.test_identifierScreenTestReportCaseResult.max_pointsScreenTestReportCaseResult.awarded_pointsScreenTestReportCaseResult.result_overridden_by_recruiter
ScreenTestReportResultScreenValidationCodeCaseResultScreenValidationCodeCaseResult.labelScreenValidationCodeCaseResult.skillScreenValidationCodeCaseResult.outcomeScreenValidationCodeCaseResult.test_identifierScreenValidationCodeCaseResult.max_pointsScreenValidationCodeCaseResult.awarded_pointsScreenValidationCodeCaseResult.result_messageScreenValidationCodeCaseResult.result_overridden_by_recruiterScreenValidationCodeCaseResult.timed_out
ScreenValidationCodeResultScreenInputOutputCaseResultScreenInputOutputCaseResult.labelScreenInputOutputCaseResult.skillScreenInputOutputCaseResult.outcomeScreenInputOutputCaseResult.max_pointsScreenInputOutputCaseResult.awarded_pointsScreenInputOutputCaseResult.result_messageScreenInputOutputCaseResult.result_overridden_by_recruiterScreenInputOutputCaseResult.timed_out
ScreenInputOutputResultScreenSQLComparisonResultScreenAcceptedAnswerScreenTextAnswerMatchingResultScreenChoiceSelectionResultScreenQuestionEvaluationScreenCodeAnswerScreenGameAnswerScreenMCQAnswerScreenTextAnswerScreenFileUploadAnswerScreenProjectAnswerScreenRecordingScreenVideoAnswerScreenQuestionAnswerScreenMCQChoiceScreenMCQResultDetailsScreenDetailedQuestionScreenDetailedQuestion.idScreenDetailedQuestion.versionScreenDetailedQuestion.typeScreenDetailedQuestion.titleScreenDetailedQuestion.domainScreenDetailedQuestion.warningsScreenDetailedQuestion.evaluationScreenDetailedQuestion.answerScreenDetailedQuestion.max_pointsScreenDetailedQuestion.awarded_pointsScreenDetailedQuestion.time_limit_secondsScreenDetailedQuestion.time_spent_secondsScreenDetailedQuestion.first_access_timeScreenDetailedQuestion.submission_timeScreenDetailedQuestion.last_activity_timeScreenDetailedQuestion.answer_statusScreenDetailedQuestion.grading_statusScreenDetailedQuestion.timed_outScreenDetailedQuestion.result_overridden_by_recruiterScreenDetailedQuestion.marked_as_cheated_by_recruiterScreenDetailedQuestion.time_spent_outside_environment_secondsScreenDetailedQuestion.environment_exit_countScreenDetailedQuestion.mcq_details
ScreenSkillResultScreenTechnologyResultScreenReportScreenReport.durationScreenReport.warningsScreenReport.pointsScreenReport.scoreScreenReport.technologiesScreenReport.total_durationScreenReport.total_pointsScreenReport.comparative_scoreScreenReport.community_statsScreenReport.marked_as_cheated_by_recruiterScreenReport.time_spent_outside_environment_secondsScreenReport.environment_exit_countScreenReport.from_dict()
ScreenTestScreenTest.idScreenTest.statusScreenTest.campaign_idScreenTest.candidate_nameScreenTest.candidate_emailScreenTest.tagsScreenTest.send_timeScreenTest.start_timeScreenTest.end_timeScreenTest.last_activity_timeScreenTest.urlScreenTest.test_urlScreenTest.reportScreenTest.questionsScreenTest.timer_typeScreenTest.organization_idScreenTest.candidate_languageScreenTest.approval_statusScreenTest.from_dict()
ScreenPaginationScreenTestsPageScreenWebhookScreenTeamScreenAccountScreenRandomQuestionConfigurationScreenRandomQuestionConfiguration.domainScreenRandomQuestionConfiguration.skillsScreenRandomQuestionConfiguration.question_typeScreenRandomQuestionConfiguration.target_duration_minutesScreenRandomQuestionConfiguration.target_experience_levelScreenRandomQuestionConfiguration.included_question_idsScreenRandomQuestionConfiguration.excluded_question_idsScreenRandomQuestionConfiguration.validate_question_selection()
ScreenCampaignQuestionScreenRandomQuestionSetScreenCampaignTimerScreenCampaignAccessPeriodScreenCampaignFollowUpQuestionsScreenCampaignWebcamProctoringScreenCampaignSettingsScreenCampaignSettings.languagesScreenCampaignSettings.timerScreenCampaignSettings.invitation_expiration_daysScreenCampaignSettings.access_periodScreenCampaignSettings.send_candidate_simplified_reportScreenCampaignSettings.copy_paste_blockedScreenCampaignSettings.follow_up_questionsScreenCampaignSettings.webcam_proctoringScreenCampaignSettings.full_screen_requiredScreenCampaignSettings.ai_assist_enabledScreenCampaignSettings.enabled_coding_agents
ScreenCampaignCreationScreenCreatedCampaignScreenAIMessageScreenAIConversationScreenQuestionUsageInsightsScreenQuestionRepartitionInsightsScreenQuestionScoreRangeInsightsScreenQuestionScoresDistributionInsightsScreenQuestionInsightsScreenTemporaryFile- Question variants
HTTPStatusErrorTransportResponseTransportJSONTransportBinaryTransportAsyncBinaryTransportHTTPXTransportHTTPX2TransportAsyncTransportAsyncJSONTransportAsyncHTTPXTransportAsyncHTTPX2TransportPaginatedListSortOrderQuestionSortOrderLanguageTeamPadInterviewerNotificationTranscriptEntryReviewReportPadPadEventPadHistoryEntryPadHistoryFileContentPadEnvironmentQuestionFileContentQuestionVariantSummaryQuestionVariantUnsetQuestionVariantFileContentQuestionVariantCandidateInstructionTestCaseCustomFileCustomDatabaseColumnCustomDatabaseTableCustomDatabaseSchemaCustomDatabaseQuestionOrganizationUserOrganizationStatsUserQuotaOrganizationOrganizationStatsUserJsonValueCoderPadErrorBadRequestErrorAuthenticationErrorForbiddenErrorNotFoundErrorRateLimitErrorServerErrorBadGatewayErrorServiceUnavailableErrorGatewayTimeoutError
- Screen question library models
ScreenQuestionSummaryScreenQuestionResourceDetailsScreenRubricCriterionDetailsScreenRubricDetailsScreenTestReportTestCaseDetailsScreenTestReportDetailsScreenValidationCodeTestCaseDetailsScreenValidationCodeDetailsScreenInputOutputTestCaseDetailsScreenInputOutputDetailsScreenQueryComparisonRulesDetailsScreenSQLQueryResultComparisonDetailsScreenEvaluationAcceptedAnswerDetailsScreenTextAnswerMatchingDetailsScreenChoiceSelectionDetailsScreenEvaluationDetailsScreenQuestionChoiceDetailsScreenMCQDetailsScreenEnvironmentDetailsScreenDatabaseEngineDetailsScreenFunctionSignatureDetailsScreenPossibleSolutionDetailsScreenCodeDetailsScreenGameDetailsScreenTextDetailsScreenFileUploadDetailsScreenVideoDetailsScreenProjectResourceDetailsScreenProjectDetailsScreenQuestionDetailsScreenQuestionsPageScreenCreatedQuestionScreenQuestionFiltersScreenRubricCriterionInputScreenRubricInputScreenValidationCodeTestCaseInputScreenValidationCodeInputScreenInputOutputTestCaseInputScreenInputOutputEvaluationInputScreenQueryComparisonRulesInputScreenSQLQueryResultComparisonInputScreenEvaluationAcceptedAnswerInputScreenTextAnswerMatchingInputScreenChoiceSelectionInputScreenEvaluationInputScreenEnvironmentInputScreenDatabaseEngineInputScreenFunctionSignatureInputScreenPossibleSolutionInputScreenCodeInputScreenQuestionChoiceInputScreenMCQInputScreenTextInputScreenVideoInputScreenProjectResourceInputScreenProjectInputScreenQuestionSaveScreenRandomQuestionConfigurationDetailsScreenCampaignQuestionDetailsScreenCampaignTimerDetailsScreenCampaignAccessPeriodDetailsScreenCampaignFollowUpQuestionsDetailsScreenCampaignWebcamProctoringDetailsScreenCampaignSettingsDetailsScreenCampaignDetails
- Questions
- Pads
- Project question starter files
- Interview analytics
- Pad pagination
- Question filters and sorting
- Pad access and creation controls
- Public API stability
- Manual invitations
- Account introspection
- Campaign definitions
- Creating campaigns
- AI Assist conversations
- Candidate project archives
- Question insights
- Question library reads and writes
- OpenAPI Spec
- Contributing to coderpad-py
- Release Process
- Unreleased changes
- [UNRELEASED DRAFT] (2026-11-11)
- Changelog