A library for Advent of Code containing utilities to use while solving problems!
Project description
Advent of Code Module
A library for Advent of Code containing utilities to use while solving problems!
If any issues or bugs are discovered, please submit an issue and I'll fix it!
About
The design of this project is meant to facilitate the full problem solution flow of Advent of Code puzzles without ever having to utilize the web browser (after the initial step of authenticating with Advent of Code and getting the session id, of course).
Installation with Poetry
The build system has been updated to utilize poetry for installation, building, and dependency management. To install/build locally, install the poetry build system through pipx.
# install pipx
sudo apt install pipx
# install poetry
pipx install poetry
Once poetry is installed, the following commands can be used to install, build, and run unit tests locally.
# install the library
poetry install
# build a wheel
poetry build
# run the tests
poetry run pytest
Formatting and linting is also available through ruff.
# run a linter check
poetry run ruff check
# run a linter check and correct issues
poetry run ruff check --fix
# format the code
poetry run ruff format
Some vulnerability scanning is also available with bandit.
poetry run bandit -c pyproject.toml -r .
Documentation
The documentation is managed and built using Sphinx through the Poetry build system. To build the documentation and open it, run the following commands:
poetry run sphinx-build -M html docs/source/ docs/build/
firefox docs/build/html/index.html
Getting and Using the SESSION_ID
The SESSION_ID is necessary to perform advanced operations like getting puzzle input and
submitting puzzle answers. Without this variable, the only operations available are getting basic
puzzle instructions and setting up a solution template file.
| Feature | session-id |
no session-id |
|---|---|---|
| Get puzzle instructions | full support | partial support |
| Get puzzle input | full support | no support |
| Submit puzzle solutions | full support | no support |
| Setup puzzle solution folder | full support | full support |
In order to obtain this variable, authenticate with https://adventofcode.com and then press F12 in the browser and navigate to the Application or Storage Tabs, if they exist, and search the cookies for the session or sessionid value.
NOTE: The session id value is a unique key for your own authenticated session with Advent of Code. You should protect it like a password and never share it (i.e. never push a session id to GitHub or store in an insecure location).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aoc_mod-0.2.0.tar.gz.
File metadata
- Download URL: aoc_mod-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a7b41eedb0fac4e5d67cb32b3d301714315a8052183f4482e73d94f9299cb6
|
|
| MD5 |
f79f0fa8c8f073b8e1a9f5a37d0fbe58
|
|
| BLAKE2b-256 |
4fd0fb5ce4d3f327176c88fbfab6aea10b9483499f7eaea4b371b842d79af2a7
|
Provenance
The following attestation bundles were made for aoc_mod-0.2.0.tar.gz:
Publisher:
build_wheel.yml on cosmos1255/aoc_mod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aoc_mod-0.2.0.tar.gz -
Subject digest:
46a7b41eedb0fac4e5d67cb32b3d301714315a8052183f4482e73d94f9299cb6 - Sigstore transparency entry: 601440312
- Sigstore integration time:
-
Permalink:
cosmos1255/aoc_mod@d945fcac9ed1bbb273c47a7b2abd9fdad4d10ee0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cosmos1255
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheel.yml@d945fcac9ed1bbb273c47a7b2abd9fdad4d10ee0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aoc_mod-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aoc_mod-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dedcf9ceef70ef893fc84b4c21224620f3857cbc3c8dae7e91f8f09c8a286175
|
|
| MD5 |
7d27dc452e899e02cbb46705b8cf4c23
|
|
| BLAKE2b-256 |
6093fcc2d9b93a33d8cbb93367f9fd39610b48ebed542b1d8d930c302f48130f
|
Provenance
The following attestation bundles were made for aoc_mod-0.2.0-py3-none-any.whl:
Publisher:
build_wheel.yml on cosmos1255/aoc_mod
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aoc_mod-0.2.0-py3-none-any.whl -
Subject digest:
dedcf9ceef70ef893fc84b4c21224620f3857cbc3c8dae7e91f8f09c8a286175 - Sigstore transparency entry: 601440313
- Sigstore integration time:
-
Permalink:
cosmos1255/aoc_mod@d945fcac9ed1bbb273c47a7b2abd9fdad4d10ee0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cosmos1255
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_wheel.yml@d945fcac9ed1bbb273c47a7b2abd9fdad4d10ee0 -
Trigger Event:
push
-
Statement type: