CogZen
A small, modern toolkit of data-wrangling helpers for cognitive-science
workflows — a 2026 rewrite of the original cogzen package.
Importing cogzen is cheap: heavy libraries (pandas, scikit-learn,
IPython) are imported lazily, only when the helper that needs them is first
used.
Install
uv pip install cogzen # or: pip install cogzen
uv pip install "cogzen[dev]" # + pytest, ruff
Modules
All public submodules are named aux_*:
| Module | Highlights |
|---|---|
cogzen.aux_sys |
chdir(locations) (host/user-aware), pushdir context manager |
cogzen.aux_log |
Log0 — stdout + optional file logger |
cogzen.aux_str |
clean_str + mapping presets, is_ascii, now(), regexes |
cogzen.aux_pandas |
disp_df/repr_df, fix_column_names, split_dataframe, wine demo |
cogzen.aux_srsly |
jsonable, yamlstr |
cogzen.aux_bids |
dict_from_bids_filename |
cogzen.aux_data |
bundled example data via importlib.resources |
Quick start
import cogzen
from cogzen.aux_str import clean_str
from cogzen.aux_str.now import now
logZ = cogzen.Log0()
log0 = logZ.logger
log0.info(now())
log0.info(clean_str(" messy text\n\n "))
Package data, the modern way
The bundled Emacs logo is an example of how data ships and is read — no
__file__ path arithmetic, works even from inside a wheel/zip:
from cogzen import aux_data
png = aux_data.read_bytes(aux_data.EMACS_LOGO_PNG) # bytes
svg = aux_data.read_text(aux_data.EMACS_LOGO_SVG) # str
with aux_data.path(aux_data.EMACS_LOGO_SVG) as p: # real Path when needed
...
Develop
uv sync --extra dev
uv run pytest
uv run ruff check .
uv run ruff format --check .
License
GPL-3.0-or-later © cogsys.io
Metadata
Release files for cogzen 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cogzen-0.1.1.tar.gz | 28.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cogzen-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.5 kB
Release files / cogzen-0.1.1.tar.gz
| Download URL | cogzen-0.1.1.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d146b216730b6465cec31347a0c73513e68e5db696a63a54067be84ec172023
|
|
BLAKE2b-256 checksum How to use checksums |
bd6d0f21fd6075105ac89f84af82664bdb5cb4293f505f324b3a79a0695d0d54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / cogzen-0.1.1-py3-none-any.whl
| Download URL | cogzen-0.1.1-py3-none-any.whl |
|---|---|
| Size | 32.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91e1b4ac6169af78c79f2f043a1e38b85e5800a3c81093d7f2de3ced571c31f0
|
|
BLAKE2b-256 checksum How to use checksums |
5e3470dd3349010b1a4af25df4a0bfb312dd54677cdc52a63dbf23eaa84a81ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|