Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lib_headspace-0.1.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lib_headspace-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for lib_headspace-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a1e8897d632948cfa7fa8f522c94b602e7a1db46b1e517b57c189759f70ff725
MD5 8546015f48adf58afe9bfd2cae316ec4
BLAKE2b-256 3e2d7e363a171a51e5e95acfe9c3e997e0d8634f99622f319caa38fe6ee39e42

See more details on using hashes here.

File details

Details for the file lib_headspace-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lib_headspace-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b78f122484c3a2ad5433f95a49ee449e095fb14180741683c20c735941271b5
MD5 865189b8e4c293e38a399722a35cb873
BLAKE2b-256 0ed5f1cfacbed0b589104ba3dd8cf10e2da70f57df68154032db346387d45f41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page