Cereja
Cereja is a Python utility package for developers who want reusable helpers for files, paths, progress display, compression, hashing, text processing, data preparation, arrays, dates, and small system tasks.
The package is published on PyPI and supports Python 3.11 and newer.
Design principles
- Zero runtime dependencies
- Standard-library-first implementations
- Small, reusable and composable APIs
- Backward compatibility where practical
- Educational implementations without hiding Python internals
Installation
python -m pip install cereja
Quick Start
import cereja as cj
path = cj.Path(".")
print(path.list_files())
from cereja.file import FileIO
file = FileIO.create("./example.txt", ["first line", "second line"])
file.add("third line")
file.save()
CLI
cereja --help
cereja tree .
cereja compress path/to/input
cereja decompress archive.cjz
Progress is enabled by default for CLI compression and decompression. Use --quiet for script-friendly output.
Cereja TUI
cereja ui
cereja ui --plain
On a terminal supporting bracketed paste, Cereja TUI provides explicit forms for System, Tree, Large files, Context, Archives and Download. Writes require exact-destination review and refuse replacement. See the Cereja TUI guide for supported limits, Windows-only directory extraction, terminal requirements and remaining human acceptance. Plain mode prints a reference and reads no input.
In /large-files, Tab completes directory paths, arrows select files, and Enter
opens file actions. Sizes use readable binary units; Details shows exact bytes.
Copy, move and permanent deletion require confirmation. Moves stay within the
same volume, and existing destinations are preserved.
Embed with from cereja.tui import TUI. The former
from cereja.ledger.app import Ledger remains an alias of the same class.
Large files by metadata
Find the largest regular files under an explicit root without reading content:
cereja large-files path/to/data --min-size-bytes 1048576 --max-results 20 --format json
Hidden and binary files are included, with no repository filters or link
traversal. The Python API is cereja.system.file_sizes.find_large_files.
See file sizes for partial-scan reporting, limits
and reproducible benchmarks.
HTTP requests and downloads
Use cereja.http.Client or AsyncClient for HTTP/1.1 requests without additional
runtime dependencies. Large responses can be streamed, and cereja.transfers
provides filesystem download helpers with atomic publication.
from cereja.http import Client
with Client(timeout=10) as client:
response = client.get("https://api.example.com/users", params={"page": 1})
response.raise_for_status()
users = response.json()
See the HTTP guide for authentication, request bodies,
response handling, async requests, streaming downloads, timeouts, retries, TLS,
and the cereja http and cereja download commands.
Bounded context search
Search for all whitespace-separated terms in UTF-8 text under one or more explicit roots:
cereja context search --root docs --query "context search" --extension md
cereja context search --root docs --root cereja --query "Path FileIO" --format json
Inventory text files without returning their content:
cereja context list --root docs --max-results 20
Use --max-file-bytes, --max-results, --max-snippets, and
--max-snippet-chars to bound search output. Searched source files are opened
read-only and are never modified. The commands decode only UTF-8 text, skip
binary files, and do not follow symbolic links.
The persistent cache is opt-in. When --cache is enabled, Cereja writes a
global per-user cache outside the searched roots. Use --cache to populate or
reuse it and --refresh-cache with --cache to force file content to be
reprocessed:
cereja context search --root docs --query "context search" --cache
cereja context search --root docs --query "context search" --cache --refresh-cache
Inspect cache metadata or clear the context-cache namespace with:
cereja context cache info --format json
cereja context cache clear
If the optional cache is unavailable, context search emits a
ContextCacheWarning and continues with a direct filesystem search.
Development
git clone https://github.com/cereja-project/cereja.git
cd cereja
python -m pip install -e .
python -m unittest discover -s tests -v
Run the syntax/undefined-name lint used by CI:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
Documentation
- Documentation: https://cereja.readthedocs.io/
- Source code: https://github.com/cereja-project/cereja
- Issues: https://github.com/cereja-project/cereja/issues/new/choose
- PyPI: https://pypi.org/project/cereja/
- Examples notebook: docs/cereja_example.ipynb
Citation
If you use Cereja in academic work, please cite it. GitHub uses CITATION.cff for the "Cite this repository" button,
and a BibTeX entry is available in CITATION.bib.
License
Cereja is distributed under the MIT License. See LICENSE for details.
Metadata
Release files for cereja 2.6.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 | Actions |
|---|---|---|---|---|
| cereja-2.6.0.tar.gz | 1.1 MB | With provenance | Details for cereja-2.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cereja-2.6.0-py3-none-any.whl | Python 3 | none | any | Details for cereja-2.6.0-py3-none-any.whl |
Total release size: 1.6 MB
Release files / cereja-2.6.0.tar.gz
| Download URL | cereja-2.6.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d85097fad7bc7e38b2954edc2658ee957a13689693dfd0cd0764498cf81b4f8b
|
|
BLAKE2b-256 checksum How to use checksums |
9258fea922b842819b708b694cb9044cfbb7389a41f1a5e22dbb3f4efa1d6fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logRelease files / cereja-2.6.0-py3-none-any.whl
| Download URL | cereja-2.6.0-py3-none-any.whl |
|---|---|
| Size | 495.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc3e70abbc07b78a5c2f44966f80f11ffd9fc46b1cc401ffc62c34ea2ce99a3c
|
|
BLAKE2b-256 checksum How to use checksums |
43bffc79591633e8817fcb4e30a031638ce386f3cb76f3d8950d9860d1a47c19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logSecurity for cereja 2.6.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for cereja-2.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.
Transparency logA 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.