Skip to main content

mjooln

Environmentally Friendly File Handling

PyPI Python versions License: Apache 2.0 pipeline status

mjooln is a small, dependency-free Python toolbox for file and folder handling. Two ideas make it more than a pathlib wrapper:

  • Atom — an 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.
  • AtomStore — an atom folder with a configuration, that stores and finds data by atom.

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(...)]

AtomStore: put data in, get it back by atom

from mjooln import AtomStore

store = AtomStore.make("~/projects/sensor", extension="json")
atom = store.put("house__kitchen__temp", {"t": 21.5})
store.fetch(atom)  # {'t': 21.5}
list(store)        # [atom], in time order

AtomStore.get("sensor")  # find it by name later, from anywhere

Modules

  • core — Atom, Toml, settings, exceptions
  • filesystem — Path, Folder, File, AtomFile, AtomFolder, Serializer, Compressor
  • encryption — Cipher, MasterKey, KeyFile (optional, pip install mjooln[encryption])
  • store — AtomStore

See docs/PRINCIPLES.md for the design rationale behind the project.

License

Apache-2.0. See LICENSE.

Metadata

Release files for mjooln 0.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mjooln 0.19.0
File Size Uploaded Provenance Actions
mjooln-0.19.0.tar.gz 45.0 kB Without provenance Details for mjooln-0.19.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mjooln 0.19.0
File Interpreter ABI Platform Actions
mjooln-0.19.0-py3-none-any.whl Python 3 none any Details for mjooln-0.19.0-py3-none-any.whl

Total release size: 100.9 kB

Release files / mjooln-0.19.0.tar.gz

Download URL mjooln-0.19.0.tar.gz
Size 45.0 kB
Tags Source
SHA-256 checksum
How to use checksums
50522f1e29c7d6e202e143e13718c410efaf52225c92374e0fe0577304c32cd9
BLAKE2b-256 checksum
How to use checksums
226fc62561f05c1e519c24d9b279795bb0ef8df0fea5a3cae65972a8ad1ff63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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.19.0-py3-none-any.whl

Download URL mjooln-0.19.0-py3-none-any.whl
Size 55.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0ad9f472d109e27bc5ca39383f5951b2815cc92f36421442e2df2712cf1d60c
BLAKE2b-256 checksum
How to use checksums
e1394030382f7c12bdf5cd08edd594fabaf2eade601e57db9d23ee05766f1c5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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}

Security for mjooln 0.19.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.19.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page