saturn
A Python library that allows to rerun a script multiple times without stopping the process and keeping the scope (like it is done in Jupyter Notebook in code sections). The goal is to keep in RAM the datasets that are expensive to load in each run.
Installation
pip install saturn-python
Basic example
# example.py
import saturn
@saturn.main
def main(scope):
if not saturn.defined('scope.a', scope): # OR if 'a' not in scope:
scope.a = 42
scope.a += 1
print(scope.a)
Run:
$ saturn
Welcome to Saturn terminal where you can reruns your Python module keeping its scope in RAM. Version 1.0.
S>>> run example
43
S>>> run example
44
S>>> print(scope)
{'a': 44}
S>>> exit
$
Work with sections
# example.py
import saturn
@saturn.main
def main(scope):
print('main')
if saturn.section('a'):
print('section a')
if saturn.section('b'):
print('section b')
Run:
$ saturn
Welcome to Saturn terminal where you can reruns your Python module keeping its scope in RAM. Version 1.0.
S>>> run example
main
section a
section b
S>>> run example a
main
section a
S>>> run example c
main
S>>> exit
$
Metadata
Release files for saturn-python 1.4
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 | |
|---|---|---|---|---|
| saturn-python-1.4.tar.gz | 3.4 kB | Without provenance | Details |
Release files / saturn-python-1.4.tar.gz
| Download URL | saturn-python-1.4.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48f4f7d2e1e1a406a2ca7e546df6f723cde750b576fb977a3d88a4be8970b5c4
|
|
BLAKE2b-256 checksum How to use checksums |
df26ca8001b48a2b92f5327cc43cfe4c07985b07d6ee1bccab58ed0a091d14e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for saturn-python 1.4
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.