Default utilities for the dareplane platform
Project description
Dareplane Python Utils
This module includes utilities for python which are used within the dareplane framework. It contains functionality which shared can be reused within multiple modules. This currently includes:
- A
DefaultServer
- which will be loaded an extended within each module to implement the dareplane API logging
- which contains the standard formatting and a SocketHandler which is modified to sendjson
representations of the logging records to the default logging server port (9020). This is used to enable cross process logging.- A
StreamWatcher
implementation - which is a utility class to query a single LSL stream into a ring buffer.
Default Dareplane Server
This default server is used by all Dareplane
python modules as a starting
point for their TCP
socket. The idea is to have a single source for common
functionality and patch everything that is model specific on top of this
Functional incarnations
Currently we are faced with two functional incarnations of servers
- Spawning functionality from the server in a separate thread, being linked via events to the main thread (usually the server).
- Spawning a subprocess for running functionality - Currently necessary for running
psychopy
as it cannot be run from outside the main thread.
Logging
The logging tools allow two main entry point, which are from dareplane_utils.logging.logger import get_logger
, which is used to get a logger with the default configuration and from dareplane_utils.logging.server import LogRecordSocketReceiver
which is used to spawn up a server for consolidating logs of different processes.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dareplane_utils-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5604607d8e6e6c9a6f6ad3c159050490aabebdbecfe233726cfd0948bcc6d9c9 |
|
MD5 | d17a947c8c90c87b9fc18aa55b9ad2c7 |
|
BLAKE2b-256 | c71d0336bb487279b0a47e9ce8d02ebaea2caf055985643dc120505763136249 |