ChangeTools (Python)
Change evaluation functions and decorators.
Direct example:
>>> from pathlib import Path
>>> from functools import partial
>>> from changetools import ChangeEvaluator
>>> hello_path = Path('hello.txt')
>>> _ = hello_path.write_text('hello')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> change_evaluator.changed
True
>>> change_evaluator.changed
False
>>> _ = hello_path.write_text('hi')
>>> change_evaluator.changed
True
>>> change_evaluator.changed
False
While example:
>>> hello_path = Path('hello.txt')
>>> change_evaluator.changed
KeyboardInterrupt
>>> _ = hello_path.write_text('hello')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> while change_evaluator.changed:
... _ = hello_path.write_text('hi')
...
For example using cycle:
>>> hello_path = Path('hello.txt')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> _ = hello_path.write_text('hello')
>>> for i in change_evaluator.cycle(10):
... print(i)
... _ = hello_path.write_text('hi')
...
0
1
Metadata
Release files for changetools 0.1.0
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 | |
|---|---|---|---|---|
| changetools-0.1.0.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| changetools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / changetools-0.1.0.tar.gz
| Download URL | changetools-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1000a49e0e0006707bf6e9745c8f35e1c22d1fe009889a9ca9c2979012611d45
|
|
BLAKE2b-256 checksum How to use checksums |
d1610d30b5a34a6b2fb272b0aed9b6a2c5ef2ad3a7239d81b53e5d86630b9311
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.14
|
Release files / changetools-0.1.0-py3-none-any.whl
| Download URL | changetools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5ff68ac37a9f654a10b796d3d47865de0c9019ab95cdabb7ee87eebfff3819d
|
|
BLAKE2b-256 checksum How to use checksums |
0027283fde9a4b50ef669987cfc217beadf2d6c164c2bdbc69631b16f6d23357
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.14
|
Security for changetools 0.1.0
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.