mjooln
Environmentally Friendly File Handling
mjooln is a small, dependency-free Python toolbox for file and folder
handling. Two ideas make it more than a pathlib wrapper:
Atom— a identifier that is unique, sortable, human-readable, and can be found inside arbitrary text just by scanning for its shape.AtomFolder— a folder with a persistent identity, so you can find it by name from anywhere on disk without remembering its path.
Install
pip install mjooln
Optional extras:
pip install mjooln[encryption] # AES file encryption
pip install mjooln[hardware-key] # FIDO2 Hardware Key Support
pip install mjooln[yaml] # YAML read/write for File
pip install mjooln[all] # All extras
Quickstart
Atom: identifiers that sort, search, and read like sentences
from mjooln import Atom
a = Atom("sensor")
str(a)
# '20260722T191721u217069Z___sensor___39A238F6_83FE_40DB_BDA5_FABDE915016A'
a.way # 'sensor'
a.time # datetime(2026, 7, 22, 19, 17, 21, ..., tzinfo=timezone.utc)
Atoms sort chronologically as plain strings, and can be found inside arbitrary text -- handy for scanning file names:
Atom.find_one(f"my_file_{a}.json.gz") # == a
AtomFolder: a folder you can find by name, from anywhere
from mjooln import AtomFolder
af = AtomFolder.make("~/projects/my_data")
af.file("readme.txt").write("hello")
# ... later, from anywhere, without knowing the path:
same_af = AtomFolder.get("my_data")
[f.name for f in same_af.list()]
# ['readme.txt']
AtomFolder is a subclass of Folder, so it behaves like one -- list(),
file(), walk(), etc. all work directly on it.
Folder and File: everyday file handling
from mjooln import Folder
fo = Folder("~/projects/my_data")
fi = fo.file("data.json")
fi.write_json({"hello": "world"})
fi.read_json()
# {'hello': 'world'}
fi = fi.compress() # data.json.gz
fi.checksum() # sha256 hex digest
AtomFile: files structurally named after an Atom
from mjooln import AtomFile, Atom
fi = AtomFile.build(fo, Atom("sensor"), data_extension="json")
fi.write_json({"hello": "world"})
fi.atom # the Atom this file's name is built from
fi.extension # 'json' -- the data extension, never gz/mjc
list(fo.atom_files()) # -> [AtomFile(...)]
Modules
core—Atom,Toml, settings, exceptionsfilesystem—Path,Folder,File,AtomFile,AtomFolder,Serializer,Compressorencryption—Cipher,MasterKey,KeyFile(optional,pip install mjooln[encryption])
See docs/PRINCIPLES.md for the design rationale
behind the project.
License
Apache-2.0. See LICENSE.
Release files for mjooln 0.16.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 | |
|---|---|---|---|
| mjooln-0.16.0.tar.gz | 36.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mjooln-0.16.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.9 kB
Release files / mjooln-0.16.0.tar.gz
| Download URL | mjooln-0.16.0.tar.gz |
|---|---|
| Size | 36.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfb9a5b6245050479f1c79d18e142dd1bcf4a3c116d5c9765e2d4ca10ecdc631
|
|
BLAKE2b-256 checksum How to use checksums |
c9ab7beb8e25c19056e75286689175fc6f4fb59846b3b2190c74a437323d7520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mjooln-0.16.0-py3-none-any.whl
| Download URL | mjooln-0.16.0-py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a20ff67cdd1f70641d2541ec121856e73c179a72395e901652611105b8a821f
|
|
BLAKE2b-256 checksum How to use checksums |
e76424c196bd1ad46053b2a047938a9feed0b8513b0a007a78cf42b8166e3fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|