Skip to main content

Session management tools in python for the libmapper signal mapping framework

Project description

mappersession

Session management tools in python for the libmapper signal mapping framework

Installation

Simply run pip install mappersession in your python environment of choice.

Usage

From the command-line

usage: [-h] [--load PATH [PATH ...]] [--stage | --no-stage] [--clear | --no-clear] [--save PATH] [--description DESCRIPTION]

optional arguments: -h, --help : Show the help message and exit

--load PATH [PATH ...] : Session JSON file(s) to load

--stage, --no-stage : Set if missing devices and signals should be staged and reconnected as they appear during session load, default false

--clear, --no-clear : Set if maps should be cleared during session load, default true

--save PATH : Save session as JSON file

--description DESCRIPTION : Description of session, used when saving

Examples:

Load a session, clear all maps and handle staging of missing connections:

python -m mappersession --load mysession.json --clear --stage

Save the current session and provide a description:

python -m mappersession --save mysession.json --description "This session does something cool"

As a module

Import the module:

import mappersession as session

Then call save/load functions with function structures detailed below:

session.save(filename, description="", values=[], viewName="", views=[])

saves the current mapping state as a JSON session file.

  • param file: The JSON file to save the session into
  • param description: A short description of the current session
  • optional param values: Array of {name, value} pairs for signals to set on session load
  • optional param viewName: Name of the GUI that's adding metadata
  • optional param views: GUI related object for recreating the session
  • return: The session JSON object

session.load(files, should_stage=False, should_clear=True)

loads one or more sessions with options for staging and cycling.

  • param files (List): The JSON files to load
  • optional param should_stage (Boolean): Manages continuous staging and reconnecting of missing devices and signals as they appear, default false
  • optional param should_clear (Boolean): Clear all maps before loading the session, default True
  • return (Dict): visual session information relevant to GUIs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mappersession-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl (15.8 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

mappersession-0.0.4-cp310-cp310-macosx_10_15_x86_64.whl (15.8 kB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

mappersession-0.0.4-cp39-cp39-win_amd64.whl (15.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

mappersession-0.0.4-cp38-cp38-manylinux_2_31_x86_64.whl (15.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.31+ x86-64

File details

Details for the file mappersession-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for mappersession-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 307822316cd877c21098df84d050b86731905a0219b21808881c074e98ba94b1
MD5 c807c4dd92c97bfb90d1ad417c9f1797
BLAKE2b-256 2ce0801dd45c0a0c578cbc8d80716b6e089a19f3677b95d494efd2e31d35c29a

See more details on using hashes here.

File details

Details for the file mappersession-0.0.4-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for mappersession-0.0.4-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 87db7eedb6c813ac6071a176a110bbb60214ab804001e4d753908fd907e0b5fd
MD5 d0c8f34602ef5e21a56735af4490f311
BLAKE2b-256 0e0aa175544576da426ead04f9f3ac929e0ada6e0c62ae3c2c1299cb18aeb9a6

See more details on using hashes here.

File details

Details for the file mappersession-0.0.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for mappersession-0.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bb6045d53d90eecbd0be38428273a5c623ce46a79658ee84dbaa16907e984d29
MD5 ef6371050a4e08e4d1f91a4beec1f1d4
BLAKE2b-256 9feacb0e90b6c417b29954b4dd3affe34c487558a57b140c62b12f5ac9bb3922

See more details on using hashes here.

File details

Details for the file mappersession-0.0.4-cp38-cp38-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mappersession-0.0.4-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 69f77457003db476286751e03490bb6697ad7d6a016ee5c9687ebf30111a790c
MD5 53456a6f7136a0ceeb5e5075d42a027e
BLAKE2b-256 fe7a271620adf88c34265fb050c10e1957dc8ac28c771fd2817d5ed89909229f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page