msw-io
Murine Shift Work session data IO: file codec, namespace utilities, and session readers.
Provides a lean, installable library for reading and writing MSW session data without
requiring the full murineshiftwork acquisition stack. Install it in analysis
environments where you only need to load sessions, not run them.
Key features
- Session readers - load MSW session data (JSONL, PKL, YAML) into structured
MswSessionmodels - Namespace utilities - build and parse MSW session paths from the canonical
subject__datetime__taskspec - IO codec - save and load trial data with numpy/tuple encoding
- Standalone - no dependency on the
murineshiftworkacquisition stack
Installation
pip install msw-io
Quick start
from murineshiftwork.readers import load_session
session = load_session("/data/mouse_01/session__20260514_143022_123456__gonogo")
print(session.subject, session.task, session.n_trials)
Load an entire acquisition (all sessions in a container directory):
from murineshiftwork.readers import load_acquisition
sessions = load_acquisition("/data/mouse_01/session__20260514_143022_123456__session_gonogo")
for s in sessions:
print(s.basename, s.is_complete)
Generate session paths for a new recording:
from murineshiftwork.namespace import generate_session_paths
paths = generate_session_paths("mouse_01", "gonogo", "/data", printout=False)
print(paths["session_folder"])
Migrating older data
msw-io-migrate (or msw data migrate with msw-core installed) renames data in
older namespace shapes to the current one, in place. It is a dry run unless
--apply is given:
msw-io-migrate /data --audit
msw-io-migrate /data --level all --report migrate_dry_run.json
msw-io-migrate /data --level all --apply --report migrate_applied.json
msw-io-migrate /data --audit
See the namespace migration page.
msw data validate PATH... checks session containers and acquisitions (or a
tree holding them); exit status 0 when all are valid, 1 on any issue.
Documentation
Full documentation including API reference: https://murineshiftwork.github.io/msw-io
Metadata
Release files for msw-io 1.18.2
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 |
|---|---|---|---|---|
| msw_io-1.18.2.tar.gz | 256.3 kB | Without provenance | Details for msw_io-1.18.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msw_io-1.18.2-py3-none-any.whl | Python 3 | none | any | Details for msw_io-1.18.2-py3-none-any.whl |
Total release size: 319.1 kB
Release files / msw_io-1.18.2.tar.gz
| Download URL | msw_io-1.18.2.tar.gz |
|---|---|
| Size | 256.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7092f93de73d5e3690df37e556aa5e4669fd516468657b06c92cddbe6943cbbe
|
|
BLAKE2b-256 checksum How to use checksums |
7a5be7c548ce89e53e3b452db8c005aad33f096d2e0b1de54a76eceb91800c83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / msw_io-1.18.2-py3-none-any.whl
| Download URL | msw_io-1.18.2-py3-none-any.whl |
|---|---|
| Size | 62.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bcace898d5c2f4d48d087f5ff8d0d37b93f116cbe189a3950e5ca5d9f6e42cc
|
|
BLAKE2b-256 checksum How to use checksums |
76f58246353c38255f56f7514b5c2053cbf73be28cea43b2015574641b8b695b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for msw-io 1.18.2
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.