Skip to main content

Python interface to the Lab Streaming Layer

Project description

pylsl

Build status PyPI version

This is the Python interface to the Lab Streaming Layer (LSL). LSL is an overlay network for real-time exchange of time series between applications, most often used in research environments. LSL has clients for many other languages and platforms that are compatible with each other.

Let us know if you encounter any bugs (ideally using the issue tracker on the GitHub project).

Installation

Prerequisites

On all non-Windows platforms and for some Windows-Python combinations, you must first obtain a liblsl shared library:

  • On many platforms it can be installed with conda install -c conda-forge liblsl
  • Additionally, on Mac it can be installed with brew install labstreaminglayer/tap/lsl
  • You might be able to find the appropriate liblsl shared object (*.so on Linux, *.dylib on MacOS, or *.dll on Windows) from the liblsl release page.
  • Otherwise you might try to clone liblsl and use its standalone_compilation_linux.sh script (works on raspberry pi).

Prepared distributions

Install from pypi using pip: pip install pylsl

For several distributions, the pip distribution ships with lsl.dll. For every other case, liblsl must be installed somewhere on the PATH (see Prerequisites above) or downloaded and copied somewhere on the search path. We recommend you copy it to the pylsl installed module path's lib subfolder. i.e. {path/to/env/}site-packages/pylsl/lib. Use python -m site to find the "site-packages" path. (use cp -L on platforms that use symlinks)

Self-built

  • Download the pylsl source: git clone https://github.com/labstreaminglayer/liblsl-Python.git && cd liblsl-Python
  • Copy the shared object (see Prerequisites above) into liblsl-Python/pylsl/lib.
  • From the liblsl-Python working directory, run pip install ..
    • Note: You can use pip install -e . to install while keeping the files in-place. This is convenient for developing pylsl.

Usage

See the examples in pylsl/examples. Note that these can be run directly from the commandline with (e.g.) python -m pylsl.examples.{name-of-example}.

You can get a list of the examples with python -c "import pylsl.examples; help(pylsl.examples)"

For maintainers

Continuous Integration

pylsl uses continuous integration and distribution.

Whenever a new commit is pushed, AppVeyor prepares several files. First it prepares the source wheels -- this is useful on any platform & Python version that does not have a specific binary distribution. Then it prepares the binary wheels; it downloads liblsl from its releases page, copies it to the package, then builds wheels for distribution. This process is repeated for several variants of Windows and Mac.

In addition, whenever a new git tag is used on a commit that is pushed to the master branch, the CI systems will deploy the wheels to pypi.

Linux Binaries Deprecated

We recently stopped building binary wheels for Linux. In practice, the manylinux dependencies were often incompatible with real systems.

When we did make manylinux distributions, these relied on special liblsl builds that are not automatically pushed to the liblsl releases page. Special pipelines needed to be run manually on Azure, then the artifacts uploaded to the release page. The Azure pipelines config remains in the liblsl repo in case it is needed again (unlikely).

Manual Distribution

  1. Manual way:
    1. rm -Rf build dist *.egg-info
    2. python setup.py sdist bdist_wheel
    3. Additional steps on Linux:
      • auditwheel repair dist/*.whl -w dist
      • rm dist/*-linux_x86_64.whl
    4. twine upload dist/*
  2. For conda
    1. build liblsl: conda build ../liblsl/
    2. conda build .

Known Issues

  • On Linux one currently cannot call pylsl functions from a thread that is not the main thread.
    • This note has been around for a long time and isn't actually tested/confirmed with more recent liblsl versions. Some users report that it indeed works. Please let us know what your experience is.

Acknowledgments

Pylsl was primarily written by Christian Kothe while at Swartz Center for Computational Neuroscience, UCSD. The LSL project was funded by the Army Research Laboratory under Cooperative Agreement Number W911NF-10-2-0022 as well as through NINDS grant 3R01NS047293-06S1. pylsl is maintained primarily by Chadwick Boulay. Thanks for contributions, bug reports, and suggestions go to Bastian Venthur, David Medine, Clemens Brunner, and Matthew Grivich.

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

pylsl-1.15.0-py2.py3-none-win_amd64.whl (351.9 kB view details)

Uploaded Python 2 Python 3 Windows x86-64

pylsl-1.15.0-py2.py3-none-win32.whl (282.2 kB view details)

Uploaded Python 2 Python 3 Windows x86

pylsl-1.15.0-py2.py3-none-macosx_10_13_x86_64.whl (685.6 kB view details)

Uploaded Python 2 Python 3 macOS 10.13+ x86-64

pylsl-1.15.0-py2.py3-none-any.whl (35.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pylsl-1.15.0-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: pylsl-1.15.0-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 351.9 kB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/2.7.17

File hashes

Hashes for pylsl-1.15.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7e5c6996cb4cf648aa172f42874429e71d3f1736fe8a01592df1305611df849f
MD5 3bf178a32cf782534a944b2d914f0f37
BLAKE2b-256 abc9a72d740f2fc90d0a9e3a362a83743563fc829776eb1f7a03255f8517d8f8

See more details on using hashes here.

Provenance

File details

Details for the file pylsl-1.15.0-py2.py3-none-win32.whl.

File metadata

  • Download URL: pylsl-1.15.0-py2.py3-none-win32.whl
  • Upload date:
  • Size: 282.2 kB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/2.7.17

File hashes

Hashes for pylsl-1.15.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 853fb4f1d75c596f83c9f3a7c7d9a4ed6f1a93120ec4a11406192699a18e38f3
MD5 2bc2e07144d8fd80705606423a3ced40
BLAKE2b-256 84f11ec0e5d61e547fa79f9901c605d8af17e4b3a534709603cea236b365ab90

See more details on using hashes here.

Provenance

File details

Details for the file pylsl-1.15.0-py2.py3-none-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: pylsl-1.15.0-py2.py3-none-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 685.6 kB
  • Tags: Python 2, Python 3, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/2.7.17

File hashes

Hashes for pylsl-1.15.0-py2.py3-none-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c93959fb762b9a222a6154d6928c941febc8a71aa979f44c63af25056beda654
MD5 6b46598c1059b93d6a5761691c9985e4
BLAKE2b-256 07172adfba4cb7614a1e601fa5bdbf86f27bbae7f245aba81006cecf3082b6b9

See more details on using hashes here.

Provenance

File details

Details for the file pylsl-1.15.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pylsl-1.15.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/2.7.17

File hashes

Hashes for pylsl-1.15.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f7188933b1f61c46a150c63b2f541d4c44c075cb310dff4938db966e206ced9b
MD5 c156fa8eea32e081b7d6acfc14f80ae8
BLAKE2b-256 ed8c3795d3450903e5a22acf6ff337c8f20b82580e979e4c7b7bd7042770a5f9

See more details on using hashes here.

Provenance

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