Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Session management tools in python for the libmapper signal mapping framework
Session management tools in python for the libmapper signal mapping framework
Simply run pip install mappersession
in your python environment of choice.
usage:
mappersession --load PATH [PATH ...] [--interactive] [--wait] [--persist] [--clear]
mappersession --unload PATH [PATH ...]
mappersession --save PATH [--description DESCRIPTION]
mappersession --print_session_tags
options:
-h, --help Show the help message and exit
--load PATH [PATH ...] Mapping session JSON file(s) to load
--unload PATH [PATH ...] Mapper session JSON file(s) to unload
--save PATH Save mapping session as JSON file
--interactive Create libmapper signals for managing file
loading and unloading.
--wait Set if session should wait for missing
devices and signals and connected them as
they appear during session load
--persist Remain active during session load and
(re)create maps as they appear.
--clear Set if maps should be cleared after saving
and/or before load. Warning – this will
clear all maps regardless of session tag!
--print_session_tags Print a list of active session tags
--description DESCRIPTION Description of session, used when saving
Examples:
Load a session file and wait for needed signals to appear:
python -m mappersession --load mysession.json --wait
Unload a session file:
python -m mappersession --unload mysession.json
Replace a running session with another
python -m mappersession --unload sesh1.json --load sesh2.json
Start an interactive session with libmapper control signals for loading/unloading each file:
python -m mappersession --load session1.json session2.json --interactive
Save the current session and provide a description:
python -m mappersession --save mysession.json --description "This session does something cool"
import mappersession as session
session.save(filename="", description="", values=[],
viewName="", views=[], graph=None)
filename
: The name of the file to savedescription
: A short description of the current sessionvalues
: Array of {name, value} pairs for signals to set on session loadviewName
: Name of the GUI that's adding metadataviews
: GUI related object for recreating the sessiongraph
: A previously-allocated libmapper Graph object to use. If not provided one will be allocated internally.session.load(filename, interactive=False, wait=False, persist=False, background=False, device_map=None, graph=None)
Loads session files and optionally waits for signals. If the optional argument device_map
is provided, mappersession will attempt to match the exact device and signal name, otherwise it will substitute a wildcard for the device name and map to all matching signals. In either case signals belonging to devices that have the property hidden=True
will not be matched.
The filename will be included in the session
property for loaded maps.
filename
(String or List): The session file(s) to loadinteractive
(Boolean): Starts an interactive session for managing multiple session files. A libmapper control signal is created for corresponding to each file; setting the control signal value to a non-zero value loads the file, and setting it to zero unloads the file.wait
(Boolean): Wait for missing signals during session load and create maps once they appear, default False
persist
(Boolean): Continue running after creating maps in session, and recreate them as matching signals (re)appear, default Falsebackground
(Boolean): True if waiting for signals should happen in a background thread, default Falsedevice_map
(Dict): A dictionary specifying correspondences between device names stored in a session file and names of devices active on the network.graph
: A previously-allocated libmapper Graph object to use. If not provided one will be allocated internally.session.unload(filename, graph=None)
Loads session files and optionally waits for signals. Maps will be tagged with the filename using a property named session
.
filename
(String or List): The session file(s) to unloadgraph
: A previously-allocated libmapper Graph object to use. If not provided one will be allocated internally.session.load_json(session_json, name=None, wait=False, persist=False, background=False, device_map=None, graph=None)
Loads a session JSON Dict with options for staging and clearing. If the optional argument device_map
is provided, mappersession will attempt to match the exact device and signal name, otherwise it will substitute a wildcard for the device name and map to all matching signals. In either case signals belonging to devices that have the property hidden=True
will not be matched.
If the optional name
argument is provided it will be included in the session
property for loaded maps.
name
(String): A name for the session; any maps created by this session will be tagged with the name.wait
(Boolean): Wait for missing signals during session load and create maps once they appear, default False
persist
(Boolean): Continue running after creating maps in session, and recreate them as matching signals (re)appear, default Falsebackground
(Boolean): True if waiting for signals should happen in a background thread, default Falsedevice_map
(Dict): A dictionary specifying correspondences between device names stored in a session file and names of devices active on the network.graph
: A previously-allocated libmapper graph object to use. If not provided one will be allocated internally.session.tags(graph=None)
graph
: A previously-allocated libmapper graph object to use. If not provided one will be allocated internally.FAQs
Session management tools in python for the libmapper signal mapping framework
We found that mappersession demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.