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.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cereja-2.1.6.tar.gz.
File metadata
- Download URL: cereja-2.1.6.tar.gz
- Upload date:
- Size: 232.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fcc4e94d22c14e3b881dc028a33c594102d0ecc46749f6d305ee85da12927b6
|
|
| MD5 |
2087cf4b586ac579ad18119298b41307
|
|
| BLAKE2b-256 |
fc754100cb639401ef0fe02c3fe5ce8323daa3fabbf19d0ae5bfcbcfaaa0a22f
|
Provenance
The following attestation bundles were made for cereja-2.1.6.tar.gz:
Publisher:
pythonpublish.yml on cereja-project/cereja
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cereja-2.1.6.tar.gz -
Subject digest:
0fcc4e94d22c14e3b881dc028a33c594102d0ecc46749f6d305ee85da12927b6 - Sigstore transparency entry: 2456667152
- Sigstore integration time:
-
Permalink:
cereja-project/cereja@f9c2dfb4ad199aba40c0b6ef311ce9d1764b7481 -
Branch / Tag:
refs/tags/2.1.6 - Owner: https://github.com/cereja-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@f9c2dfb4ad199aba40c0b6ef311ce9d1764b7481 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cereja-2.1.6-py3-none-any.whl.
File metadata
- Download URL: cereja-2.1.6-py3-none-any.whl
- Upload date:
- Size: 217.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a14392a1d70125b6b0204356d34d01350f3dc71a9dadb779149539a51d18b2dc
|
|
| MD5 |
834ea7c9e69cf10bd4c54706fa8e3ec7
|
|
| BLAKE2b-256 |
95435835dee6444899a65f0e6724f8373cc43f7bebac5aff44ea7f344facd585
|
Provenance
The following attestation bundles were made for cereja-2.1.6-py3-none-any.whl:
Publisher:
pythonpublish.yml on cereja-project/cereja
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cereja-2.1.6-py3-none-any.whl -
Subject digest:
a14392a1d70125b6b0204356d34d01350f3dc71a9dadb779149539a51d18b2dc - Sigstore transparency entry: 2456667340
- Sigstore integration time:
-
Permalink:
cereja-project/cereja@f9c2dfb4ad199aba40c0b6ef311ce9d1764b7481 -
Branch / Tag:
refs/tags/2.1.6 - Owner: https://github.com/cereja-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@f9c2dfb4ad199aba40c0b6ef311ce9d1764b7481 -
Trigger Event:
release
-
Statement type: