jupyter-cache
A defined interface for working with a cache of jupyter notebooks.
Why use jupyter-cache?
If you have a number of notebooks whose execution outputs you want to ensure are kept up to date, without having to re-execute them every time (particularly for long running code, or text-based formats that do not store the outputs).
The notebooks must have deterministic execution outputs:
- You use the same environment to run them (e.g. the same installed packages)
- They run no non-deterministic code (e.g. random numbers)
- They do not depend on external resources (e.g. files or network connections) that change over time
For example, it is utilised by jupyter-book, to allow for fast document re-builds.
Install
pip install jupyter-cache
For development:
git clone https://github.com/executablebooks/jupyter-cache
cd jupyter-cache
git checkout develop
pip install -e .[cli,code_style,testing]
See the documentation for usage.
Development
Some desired requirements (not yet all implemented):
- Persistent
- Separates out "edits to content" from "edits to code cells". Cell rearranges and code cell changes should require a re-execution. Content changes should not.
- Allow parallel access to notebooks (for execution)
- Store execution statistics/reports
- Store external assets: Notebooks being executed often require external assets: importing scripts/data/etc. These are prepared by the users.
- Store execution artefacts: created during execution
- A transparent and robust cache invalidation: imagine the user updating an external dependency or a Python module, or checking out a different git branch.
Contributing
jupyter-cache follows the Executable Book Contribution Guide. We'd love your help!
Code Style
Code style is tested using flake8,
with the configuration set in .flake8,
and code formatted with black.
Installing with jupyter-cache[code_style] makes the pre-commit
package available, which will ensure this style is met before commits are submitted, by reformatting the code
and testing for lint errors.
It can be setup by:
>> cd jupyter-cache
>> pre-commit install
Optionally you can run black and flake8 separately:
>> black .
>> flake8 .
Editors like VS Code also have automatic code reformat utilities, which can adhere to this standard.
Metadata
Release files for jupyter-cache 1.0.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 |
|---|---|---|---|---|
| jupyter_cache-1.0.1.tar.gz | 32.0 kB | Without provenance | Details for jupyter_cache-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_cache-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for jupyter_cache-1.0.1-py3-none-any.whl |
Total release size: 66.0 kB
Release files / jupyter_cache-1.0.1.tar.gz
| Download URL | jupyter_cache-1.0.1.tar.gz |
|---|---|
| Size | 32.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16e808eb19e3fb67a223db906e131ea6e01f03aa27f49a7214ce6a5fec186fb9
|
|
BLAKE2b-256 checksum How to use checksums |
bbf73627358075f183956e8c4974603232b03afd4ddc7baf72c2bc9fff522291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Release files / jupyter_cache-1.0.1-py3-none-any.whl
| Download URL | jupyter_cache-1.0.1-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c3cafd825ba7da8b5830485343091143dff903e4d8c69db9349b728b140abf6
|
|
BLAKE2b-256 checksum How to use checksums |
646b67b87da9d36bff9df7d0efbd1a325fa372a43be7158effaf43ed7b22341d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.3
|
Security for jupyter-cache 1.0.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.