preader 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- preader-1.0.0/.gitattributes +1 -0
- preader-1.0.0/.gitignore +94 -0
- preader-1.0.0/CHANGELOG.md +26 -0
- preader-1.0.0/CLAUDE.md +24 -0
- preader-1.0.0/Cargo.lock +1415 -0
- preader-1.0.0/Cargo.toml +84 -0
- preader-1.0.0/LICENSE +21 -0
- preader-1.0.0/Makefile +241 -0
- preader-1.0.0/PKG-INFO +238 -0
- preader-1.0.0/README.md +205 -0
- preader-1.0.0/build.rs +6 -0
- preader-1.0.0/pyproject.toml +117 -0
- preader-1.0.0/python/preader/__init__.py +7 -0
- preader-1.0.0/python/preader/preader.pyi +821 -0
- preader-1.0.0/python/preader/py.typed +0 -0
- preader-1.0.0/rustfmt.toml +12 -0
- preader-1.0.0/src/bases/builder.rs +130 -0
- preader-1.0.0/src/bases/iterator.rs +536 -0
- preader-1.0.0/src/bases/mod.rs +2 -0
- preader-1.0.0/src/builders/base.rs +215 -0
- preader-1.0.0/src/builders/chunk.rs +67 -0
- preader-1.0.0/src/builders/line.rs +99 -0
- preader-1.0.0/src/builders/mod.rs +4 -0
- preader-1.0.0/src/builders/segment.rs +128 -0
- preader-1.0.0/src/constants.rs +33 -0
- preader-1.0.0/src/enums/autosave.rs +60 -0
- preader-1.0.0/src/enums/error/core.rs +142 -0
- preader-1.0.0/src/enums/error/mismatch.rs +89 -0
- preader-1.0.0/src/enums/error/mod.rs +3 -0
- preader-1.0.0/src/enums/error/name.rs +39 -0
- preader-1.0.0/src/enums/mod.rs +4 -0
- preader-1.0.0/src/enums/skip.rs +63 -0
- preader-1.0.0/src/enums/source.rs +103 -0
- preader-1.0.0/src/interfaces/iterator.rs +56 -0
- preader-1.0.0/src/interfaces/mod.rs +3 -0
- preader-1.0.0/src/interfaces/segmented.rs +14 -0
- preader-1.0.0/src/interfaces/skip.rs +7 -0
- preader-1.0.0/src/iterators/byte.rs +77 -0
- preader-1.0.0/src/iterators/chunk.rs +122 -0
- preader-1.0.0/src/iterators/line.rs +133 -0
- preader-1.0.0/src/iterators/mod.rs +5 -0
- preader-1.0.0/src/iterators/segment.rs +129 -0
- preader-1.0.0/src/iterators/state.rs +118 -0
- preader-1.0.0/src/lib.rs +115 -0
- preader-1.0.0/src/macros.rs +14 -0
- preader-1.0.0/src/preader.rs +237 -0
- preader-1.0.0/src/registry.rs +687 -0
- preader-1.0.0/src/serializers/mod.rs +2 -0
- preader-1.0.0/src/serializers/time.rs +59 -0
- preader-1.0.0/src/types/config.rs +58 -0
- preader-1.0.0/src/types/core.rs +30 -0
- preader-1.0.0/src/types/file.rs +133 -0
- preader-1.0.0/src/types/mod.rs +8 -0
- preader-1.0.0/src/types/options.rs +91 -0
- preader-1.0.0/src/types/progress.rs +65 -0
- preader-1.0.0/src/types/state.rs +261 -0
- preader-1.0.0/src/types/time.rs +43 -0
- preader-1.0.0/src/types/window.rs +106 -0
- preader-1.0.0/src/utils/file.rs +116 -0
- preader-1.0.0/src/utils/hash.rs +17 -0
- preader-1.0.0/src/utils/mod.rs +8 -0
- preader-1.0.0/src/utils/path.rs +89 -0
- preader-1.0.0/src/utils/time.rs +61 -0
- preader-1.0.0/src/validators.rs +102 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
preader-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/target
|
|
2
|
+
|
|
3
|
+
# Byte-compiled / optimized / DLL files
|
|
4
|
+
__pycache__/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
.venv/
|
|
14
|
+
env/
|
|
15
|
+
bin/
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
include/
|
|
26
|
+
man/
|
|
27
|
+
venv/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
|
|
32
|
+
# Installer logs
|
|
33
|
+
pip-log.txt
|
|
34
|
+
pip-delete-this-directory.txt
|
|
35
|
+
pip-selfcheck.json
|
|
36
|
+
|
|
37
|
+
# Type checker / linter caches
|
|
38
|
+
.mypy_cache/
|
|
39
|
+
.ruff_cache/
|
|
40
|
+
|
|
41
|
+
# Unit test / coverage reports
|
|
42
|
+
htmlcov/
|
|
43
|
+
.tox/
|
|
44
|
+
.coverage
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
lcov.info
|
|
49
|
+
codecov.json
|
|
50
|
+
*.profraw
|
|
51
|
+
*.profdata
|
|
52
|
+
|
|
53
|
+
# Translations
|
|
54
|
+
*.mo
|
|
55
|
+
|
|
56
|
+
# Mr Developer
|
|
57
|
+
.mr.developer.cfg
|
|
58
|
+
.project
|
|
59
|
+
.pydevproject
|
|
60
|
+
|
|
61
|
+
# Rope
|
|
62
|
+
.ropeproject
|
|
63
|
+
|
|
64
|
+
# Django stuff:
|
|
65
|
+
*.log
|
|
66
|
+
*.pot
|
|
67
|
+
|
|
68
|
+
.DS_Store
|
|
69
|
+
|
|
70
|
+
# Docs (mdBook + Sphinx output)
|
|
71
|
+
book/book/
|
|
72
|
+
docs/site/
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyCharm
|
|
76
|
+
.idea/
|
|
77
|
+
|
|
78
|
+
# VSCode
|
|
79
|
+
.vscode/
|
|
80
|
+
|
|
81
|
+
# Pyenv
|
|
82
|
+
.python-version
|
|
83
|
+
|
|
84
|
+
# preader state directory
|
|
85
|
+
.preader/
|
|
86
|
+
|
|
87
|
+
# Secrets and credentials
|
|
88
|
+
.env
|
|
89
|
+
.env.*
|
|
90
|
+
*.pem
|
|
91
|
+
*.key
|
|
92
|
+
id_rsa
|
|
93
|
+
id_ed25519
|
|
94
|
+
credentials.json
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-12-06
|
|
11
|
+
|
|
12
|
+
Initial stable release
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Four iterator types: `bytes()`, `chunks()`, `lines()`, and `segments()` for reading files in different modes
|
|
17
|
+
- Resumable reads with `save()` and automatic state restoration
|
|
18
|
+
- Progress tracking with `percent()` method
|
|
19
|
+
- Autosave support with configurable byte thresholds
|
|
20
|
+
- State management through `StateRegistry` with `names()`, `load()`, `search()`, `delete()`, `resync()`, and more
|
|
21
|
+
- State verification using file size, path, modification time, and SHA-256 fingerprint
|
|
22
|
+
- Windowing support with `start`, `end`, `skip`, and `limit` parameters
|
|
23
|
+
- Cross-platform support for Linux, macOS, and Windows with portable state naming rules
|
|
24
|
+
- Python bindings via PyO3 with identical API semantics
|
|
25
|
+
- Comprehensive documentation with mdBook user guide and Sphinx Python API reference
|
|
26
|
+
- Property-based testing with proptest (Rust) and hypothesis (Python)
|
preader-1.0.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# preader
|
|
2
|
+
|
|
3
|
+
Rust core + PyO3 Python bindings. Reads files as bytes, chunks, UTF-8 lines or
|
|
4
|
+
delimiter-separated segments, saves progress as state, resumes where it stopped.
|
|
5
|
+
|
|
6
|
+
## Commands
|
|
7
|
+
|
|
8
|
+
- `make cargo-nextest` - Rust tests
|
|
9
|
+
- `make pytest` - Python tests (builds extension first)
|
|
10
|
+
- `make cargo-clippy` - Rust lint
|
|
11
|
+
- `make ruff-check` - Python lint
|
|
12
|
+
- `make cargo-doc-test` - Doctests
|
|
13
|
+
- `make develop` - Build Python extension
|
|
14
|
+
- `make examples-python` / `make examples-rust` - Run examples
|
|
15
|
+
- `make pre-commit` - All checks
|
|
16
|
+
|
|
17
|
+
Run Python with `uv run --no-sync --no-cache`.
|
|
18
|
+
|
|
19
|
+
## Skills
|
|
20
|
+
|
|
21
|
+
| Need | Skill |
|
|
22
|
+
|------------------------------------------|-----------------------|
|
|
23
|
+
| Writing or reviewing code, tests, docs | `preader-conventions` |
|
|
24
|
+
| Architecture, builds, state behavior, CI | `preader-project` |
|