[![PyPi](https://img.shields.io/pypi/v/advent-of-code.svg)](https://pypi.org/project/advent-of-code/)
# advent-of-code-python
Solutions to [Advent of Code](https://adventofcode.com/) implemented in Rust and exposed to Python using [PyO3](https://pyo3.rs/).
# Usage as a library
Add dependency:
```sh
pip install --upgrade advent-of-code
```
The `advent_of_code` package exports a single `solve` function with the following signature:
```python
def solve(year: int, day: int, part: int, input: str) -> str
```
Examples:
```python
from advent_of_code import solve
assert solve(2019, 1, 1, "14") == "2"
assert solve(2019, 3, 2, "R8,U5,L5,D3\nU7,R6,D4,L4") == "30"
```
# Usage as a command line tool
```sh
$ pip install --upgrade advent-of-code
$ echo 14 | advent-of-code-py 2019 1 1
2
```
Raw data
{
"_id": null,
"home_page": "https://github.com/fornwall/advent-of-code",
"name": "advent-of-code",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "",
"download_url": "",
"platform": null,
"description": "[![PyPi](https://img.shields.io/pypi/v/advent-of-code.svg)](https://pypi.org/project/advent-of-code/)\n\n# advent-of-code-python\nSolutions to [Advent of Code](https://adventofcode.com/) implemented in Rust and exposed to Python using [PyO3](https://pyo3.rs/).\n\n# Usage as a library\nAdd dependency:\n\n```sh\npip install --upgrade advent-of-code\n```\n\nThe `advent_of_code` package exports a single `solve` function with the following signature:\n\n```python\ndef solve(year: int, day: int, part: int, input: str) -> str\n```\n\nExamples:\n\n```python\nfrom advent_of_code import solve\n\nassert solve(2019, 1, 1, \"14\") == \"2\"\nassert solve(2019, 3, 2, \"R8,U5,L5,D3\\nU7,R6,D4,L4\") == \"30\"\n```\n\n# Usage as a command line tool\n\n```sh\n$ pip install --upgrade advent-of-code\n$ echo 14 | advent-of-code-py 2019 1 1\n2\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "2022.0.66",
"project_urls": {
"Homepage": "https://github.com/fornwall/advent-of-code"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "26e5c914842124f79930ee7821b8e62421dd0ee078e87515352a553147651517",
"md5": "d09e614c9e175ca84498c5b86245ae37",
"sha256": "8b4dac3a400584b4fbfc13b90dd7504c64fc2a630f4908ebea17d6545fb2aad3"
},
"downloads": -1,
"filename": "advent_of_code-2022.0.66-cp39-abi3-macosx_10_9_universal2.whl",
"has_sig": false,
"md5_digest": "d09e614c9e175ca84498c5b86245ae37",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 1526618,
"upload_time": "2024-02-25T00:58:41",
"upload_time_iso_8601": "2024-02-25T00:58:41.700234Z",
"url": "https://files.pythonhosted.org/packages/26/e5/c914842124f79930ee7821b8e62421dd0ee078e87515352a553147651517/advent_of_code-2022.0.66-cp39-abi3-macosx_10_9_universal2.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3284da0c32e1d7592d6b00f1360df17b46bc0f27649947d404dc9580e2b7a3e3",
"md5": "f1214c3359cd2733a99f14a07d309287",
"sha256": "3dfbb31c16e49c7a53271d52df16325eb305e56be71a269b81f8974c3c90770c"
},
"downloads": -1,
"filename": "advent_of_code-2022.0.66-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "f1214c3359cd2733a99f14a07d309287",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 834468,
"upload_time": "2024-02-25T00:58:45",
"upload_time_iso_8601": "2024-02-25T00:58:45.200559Z",
"url": "https://files.pythonhosted.org/packages/32/84/da0c32e1d7592d6b00f1360df17b46bc0f27649947d404dc9580e2b7a3e3/advent_of_code-2022.0.66-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a7a5218192ff76a32c6fb22d10875434c1ffe25d9ddd67491d11b2a271af1351",
"md5": "8d111cbe17b3ad8556bfd6aff762fcf6",
"sha256": "bb11049e0f540e3f43bcee8eda6662c51dc9d5d0b26286d221e8e2f9332b33e2"
},
"downloads": -1,
"filename": "advent_of_code-2022.0.66-cp39-abi3-musllinux_1_1_x86_64.whl",
"has_sig": false,
"md5_digest": "8d111cbe17b3ad8556bfd6aff762fcf6",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 867271,
"upload_time": "2024-02-25T00:58:47",
"upload_time_iso_8601": "2024-02-25T00:58:47.969148Z",
"url": "https://files.pythonhosted.org/packages/a7/a5/218192ff76a32c6fb22d10875434c1ffe25d9ddd67491d11b2a271af1351/advent_of_code-2022.0.66-cp39-abi3-musllinux_1_1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "560e915132a08113f28ab6b38e4d878264362e94fc7bce5a9a112cd98a1ea03a",
"md5": "6b4fef1029ffccd354c68238da251b78",
"sha256": "64c5eeff8cc91f97b15e94bc56892d9b160b54f12789ace6a48959dd36476d6c"
},
"downloads": -1,
"filename": "advent_of_code-2022.0.66-cp39-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "6b4fef1029ffccd354c68238da251b78",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 737891,
"upload_time": "2024-02-25T00:58:50",
"upload_time_iso_8601": "2024-02-25T00:58:50.742980Z",
"url": "https://files.pythonhosted.org/packages/56/0e/915132a08113f28ab6b38e4d878264362e94fc7bce5a9a112cd98a1ea03a/advent_of_code-2022.0.66-cp39-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-25 00:58:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fornwall",
"github_project": "advent-of-code",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "advent-of-code"
}