Skip to main content

pypi actions codecov womm

Everybody Codes Data

This library is used to decrypt input notes for everybody.codes events.

Install

pip install everybody-codes-data

Auth

Your auth token should be placed at ~/.config/ecd/token or defined in the ECD_TOKEN environment variable. Get the token from the "Session Cookie" section on your profile.

Usage

There is a getter function ecd.get_inputs which accepts the quest and event, and returns a dict of your decrypted data. The dict will have string keys "1", "2", "3" corresponding to the puzzle parts. Inputs are unlocked as you complete subsequent parts, so the dict will have only the key "1" initially.

>>> from ecd import get_inputs
>>> data = get_inputs(quest=3, event=2024)
>>> print(data["1"])
..............................
..............................
.............#................
.............##.#...#.........
..........#.#####...###.......
..........#########.#.........
.........############.........
.........##############.......
.........#############........
..........##.###.##...........
...........#...#.#............
...........#..................
..............................
..............................

There is also a CLI:

$ ecd 3 2024 --part 1
..............................
..............................
.............#................
.............##.#...#.........
..........#.#####...###.......
..........#########.#.........
.........############.........
.........##############.......
.........#############........
..........##.###.##...........
...........#...#.#............
...........#..................
..............................
..............................

See ecd --help for more info on that.

Submission

everybody-codes-data can also post answers.

from ecd import submit
submit(quest=1, event=2024, part=1, answer=1323)

If you don't want the submission result printed to the terminal, pass quiet=True.

The result of the submission will be logged (so you may want to configure the logging framework in your project), but if you want to see the result explicitly the return value here is just a urllib3.HTTPResponse instance.

from ecd import submit
result = submit(quest=1, event=2024, part=1, answer=1323, quiet=True)
print(result.status)
print(result.json())

Import interface

There is also a "magic" interface, similar to advent-of-code-data, where you can use a direct import statement. To use this feature, you must structure your directories and filenames like ec{event}/q{quest}.py in order that the library can introspect the event/quest from the path. For example, this structure should work:

my-repo/ec2024/q01.py    (event=2024, quest=1) 
my-repo/ec2024/q02.py    (event=2024, quest=2)
my-repo/ec2025/q01.py    (event=2025, quest=1)

Then in your script, the dict of data will be populated from an import statement:

from ecd import data

If you don't want to use this directory structure, call the ecd.get_inputs() function directly instead of using the import syntax. The getter function has no restrictions on script, module or package names.

Caching

This library will cache inputs to avoid hitting the server unnecessarily. Your input data will only be cached locally once all three parts can be decrypted (i.e. once you've solved part 1 and part 2). There is no caching for partial solves. Caches are stored at ~/.config/ecd in JSON format, they can be safely removed anytime.

Metadata

Release files for everybody-codes-data 0.6

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

Source distribution (sdist)

Source distribution for everybody-codes-data 0.6
File Size Uploaded Provenance
everybody_codes_data-0.6.tar.gz 8.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for everybody-codes-data 0.6
File Interpreter ABI Platform
everybody_codes_data-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / everybody_codes_data-0.6.tar.gz

Download URL everybody_codes_data-0.6.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fa32bd766adb185a296cd28f42cc57f729eb7ca4f499fe1aab93b9a6a214ece1
BLAKE2b-256 checksum
How to use checksums
bf954e5b53ef15ba73600abcde3624facac461d1bbcfa7943d7e44dbe2e3638f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / everybody_codes_data-0.6-py3-none-any.whl

Download URL everybody_codes_data-0.6-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfe71660650026d22c4f7be85d60f9aad3c45a6c4722f0da7d32ecd4048d0a41
BLAKE2b-256 checksum
How to use checksums
7659ea86fa6a89e108aee150b035c48c2aef84ea67c899022b640cd9161dc9e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for everybody-codes-data 0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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