# API Reference


## Puzzle inputs and answers


[get_puzzle_input()](get_puzzle_input.md#elf.get_puzzle_input)  
Retrieve the raw puzzle input for a specific Advent of Code puzzle.

[submit_puzzle_answer()](submit_puzzle_answer.md#elf.submit_puzzle_answer)  
Submit an answer for a specific puzzle part.

[SubmissionResult](SubmissionResult.md#elf.SubmissionResult)  
Outcome of an answer attempt or a local submission guardrail.


## Progress and leaderboards


[get_user_status()](get_user_status.md#elf.get_user_status)  
Retrieve the user's Advent of Code progress for the specified year.

[get_private_leaderboard()](get_private_leaderboard.md#elf.get_private_leaderboard)  
Retrieve a private leaderboard for a given year.

[DayStatus](DayStatus.md#elf.DayStatus)  
Calendar entry for one puzzle day.

[YearStatus](YearStatus.md#elf.YearStatus)  
Advent of Code calendar and account summary for an event page.

[Leaderboard](Leaderboard.md#elf.Leaderboard)  
Private leaderboard and its members for one Advent of Code event.

[OutputFormat](OutputFormat.md#elf.OutputFormat)  
Output formats for status and leaderboard queries.


## Puzzle helpers


[helpers.parse_input()](helpers.parse_input.md#elf.helpers.parse_input)  
Split text at line boundaries, retaining whitespace within each line.

[helpers.read_input()](helpers.read_input.md#elf.helpers.read_input)  
Read a UTF-8 input file and strip leading and trailing whitespace.

[helpers.timer()](helpers.timer.md#elf.helpers.timer)  
Create a decorator that reports elapsed time on successful calls.


## Submission and leaderboard models


[models.SubmissionStatus](models.SubmissionStatus.md#elf.models.SubmissionStatus)  
Outcomes used in submission results and cached guess history.

[models.Member](models.Member.md#elf.models.Member)  
One participant on a private leaderboard.

[models.StarCompletion](models.StarCompletion.md#elf.models.StarCompletion)  
Completion of one part of a puzzle by a leaderboard member.


## Exceptions


[exceptions.ElfError](exceptions.ElfError.md#elf.exceptions.ElfError)  
Base exception for elf package errors.

[exceptions.MissingSessionTokenError](exceptions.MissingSessionTokenError.md#elf.exceptions.MissingSessionTokenError)  
Raised when the Advent of Code session token is missing.

[exceptions.PuzzleLockedError](exceptions.PuzzleLockedError.md#elf.exceptions.PuzzleLockedError)  
Raised when a puzzle has yet to unlock in America/New_York.

[exceptions.InputFetchError](exceptions.InputFetchError.md#elf.exceptions.InputFetchError)  
Raised when there is an issue fetching the puzzle input.

[exceptions.SubmissionError](exceptions.SubmissionError.md#elf.exceptions.SubmissionError)  
Raised when there is an issue submitting the answer.

[exceptions.LeaderboardFetchError](exceptions.LeaderboardFetchError.md#elf.exceptions.LeaderboardFetchError)  
Raised when there is an issue fetching a private leaderboard.

[exceptions.StatusFetchError](exceptions.StatusFetchError.md#elf.exceptions.StatusFetchError)  
Raised when there is an issue fetching a user's status page.
