caffeinated
Provide statistics about your caffeine level specifically when you'd be going to bed. This package was inspired by coffee-o-clock.
The formula used for calculating the amount of caffeine remaining in your system is:
$$ N(t) = N_0 \left( \frac{1}{2} \right)^{\frac{t}{t_6}} $$
Where:
- $N(t)$ = Quantity of caffeine remaining
- $N_0$ = Original amount of caffeine
- $t$ = Time
- $t_6$ = Coffee's half-life (6 hours)
Installation
Install this tool using pip:
pip install caffeinated
Usage
For help, run:
caffeinated --help
Example usage:
caffeinated --caffeine 200 --bedtime 9pm
You would have 50.0mg of caffeine in your system if you went to bed at 9:00pm (in 12.0 hours).
That's like having 56% of a cup of coffee before bed.
You can also specify the time you're starting to consume caffeine. Both bedtime and start time can be specified in 12-hour or 24-hour format.
caffeinated --caffeine 200 --bedtime 2100 --start-time 0600
You would have 35.4mg of caffeine in your system if you went to bed at 9:00pm (in 15.0 hours).
That's like having 39% of a cup of coffee before bed.
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd caffeinated
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for caffeinated 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| caffeinated-0.1.1.tar.gz | 16.4 kB | Without provenance | Details for caffeinated-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| caffeinated-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for caffeinated-0.1.1-py3-none-any.whl |
Total release size: 33.0 kB
Release files / caffeinated-0.1.1.tar.gz
| Download URL | caffeinated-0.1.1.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c91a67908a4e5f41c18598faee9450fe3bec65389b093260bafb1829ae45a02
|
|
BLAKE2b-256 checksum How to use checksums |
7933357a97ca7ac640c254a219f3bca646359fb4e6e2f2006004fa7b565eaeba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.7
|
Release files / caffeinated-0.1.1-py3-none-any.whl
| Download URL | caffeinated-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03f95733b1ca3bed5e985ed3f7e24587a9616501ece623a730546cf4e11929f9
|
|
BLAKE2b-256 checksum How to use checksums |
810ab1d55b7d5f212a187b75c0918346263bda140f33727ff00418a485d9a5b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.7
|
Security for caffeinated 0.1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.