Skip to main content

msw-io

PyPI

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 MswSession models
  • Namespace utilities - build and parse MSW session paths from the canonical subject__datetime__task spec
  • IO codec - save and load trial data with numpy/tuple encoding
  • Standalone - no dependency on the murineshiftwork acquisition 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.1

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

Source distribution (sdist)

Source distribution for msw-io 1.18.1
File Size Uploaded Provenance Actions
msw_io-1.18.1.tar.gz 254.7 kB Without provenance Details for msw_io-1.18.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msw-io 1.18.1
File Interpreter ABI Platform Actions
msw_io-1.18.1-py3-none-any.whl Python 3 none any Details for msw_io-1.18.1-py3-none-any.whl

Total release size: 317.5 kB

Release files / msw_io-1.18.1.tar.gz

Download URL msw_io-1.18.1.tar.gz
Size 254.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dca3d26eb315efe75968c31743a7178613bf003f84c28e4af7a2976dbdb600b9
BLAKE2b-256 checksum
How to use checksums
2935e601a935541019ef562dce581ee89ecaf76be193cdf66030ef917b50f5d4
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.1-py3-none-any.whl

Download URL msw_io-1.18.1-py3-none-any.whl
Size 62.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
890e9e9065bca837b390985db692b2e5bf03f410200a523971241b8047a63551
BLAKE2b-256 checksum
How to use checksums
50ba2419bd947beb472e0d597cc2d6d410bc2e0475b5092b55708d89d7e8c595
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.1

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

1.18.1 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