Basic API client for Headspace
Project description
lib-headspace
[!NOTE] This library is not affiliated with Headspace in any way.
I have reverse-engineered the API and it could change, and thus break this library, at any time.
This is a simple library to interact with the (private) Headspace API.
It is meant for reading data; writing data or accessing the audio content is not supported and likely never will be.
Using the library
See demos/readme.md for a quick start guide.
Dev
uv is used as a replacement for poetry.
Install uv first and then it's quick/easy to get going:
# Note: Yes, this really does need 3.13!
❯ uv venv --python=3.13
Using CPython 3.13.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
# Install dependencies; consider --group=dev
❯ uv sync
Resolved 21 packages in 13ms
<...>
+ pycparser==2.22
+ pyjwt==2.10.0
+ pytest==8.3.3
+ ruff==0.7.4
+ structlog==24.4.0
+ yarl==1.18.0
.pre-commit
uv will have taken care of installing pre-commit if you used uv sync --group=dev to install dev dependencies.
As long as pre-commit is in your $PATH, connecting it to git is simple:
❯ pre-commit install
pre-commit installed at .git/hooks/pre-commit
You can run pre-commit run --all-files to lint and format your code.
[!NOTE] The first time you run
pre-commit, it will take a while to download and install the hooks.
❯ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
TODO
- Tests for the client; currently could use a bit of a refactor.
- GHA automations
- Automation to clean up old GHA runs
Project details
Release history Release notifications | RSS feed
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 lib_headspace-0.1.0.tar.gz.
File metadata
- Download URL: lib_headspace-0.1.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1e8897d632948cfa7fa8f522c94b602e7a1db46b1e517b57c189759f70ff725
|
|
| MD5 |
8546015f48adf58afe9bfd2cae316ec4
|
|
| BLAKE2b-256 |
3e2d7e363a171a51e5e95acfe9c3e997e0d8634f99622f319caa38fe6ee39e42
|
File details
Details for the file lib_headspace-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lib_headspace-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b78f122484c3a2ad5433f95a49ee449e095fb14180741683c20c735941271b5
|
|
| MD5 |
865189b8e4c293e38a399722a35cb873
|
|
| BLAKE2b-256 |
0ed5f1cfacbed0b589104ba3dd8cf10e2da70f57df68154032db346387d45f41
|