pylsl


Namepylsl JSON
Version 1.16.2 PyPI version JSON
download
home_pagehttps://github.com/labstreaminglayer/pylsl
SummaryPython interface to the Lab Streaming Layer
upload_time2023-10-25 19:57:04
maintainer
docs_urlNone
authorChristian Kothe
requires_python
licenseMIT
keywords networking lsl lab streaming layer labstreaminglayer data acquisition
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pylsl

![publish workflow](https://github.com/labstreaminglayer/pylsl/actions/workflows/publish-to-pypi.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/pylsl.svg)](https://badge.fury.io/py/pylsl)

This is the Python interface to the [Lab Streaming Layer (LSL)](https://github.com/sccn/labstreaminglayer).
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. See the [liblsl repo documentation](https://github.com/sccn/liblsl) for further details.

## Get pylsl from PyPI

* `pip install pylsl`

## Get pylsl from source

This should only be necessary if you need to modify or debug pylsl.

* Download the pylsl source: `git clone https://github.com/labstreaminglayer/pylsl.git && cd pylsl`  
* From the `pylsl` 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)"`

## liblsl loading

`pylsl` will search for `liblsl` first at the filepath specified by an environment variable named `PYLSL_LIB`, then in the package directory (default location for Windows), then finally in normal system library folders.

If the shared object is not installed onto a standard search path (or it is but can't be found for some [other bug](https://github.com/labstreaminglayer/pylsl/issues/48)), then we recommend that you copy it to the pylsl installed module path's `lib` subfolder. i.e. `{path/to/env/}site-packages/pylsl/lib`.

* The `site-packages/pylsl` path will only exist _after_ you install `pylsl` in your Pyton environment.
* You may have to create the `lib` subfolder.
* Use `python -m site` to find the "site-packages" path.
* Use `cp -L` on platforms that use symlinks.

Alternatively, you can use an environment variable. Set the `PYLSL_LIB` environment variable to the location of the library or set `LD_LIBRARY_PATH` to the folder containing the library. For example,

1. `PYLSL_LIB=/usr/local/lib/liblsl.so python -m pylsl.examples.{name-of-example}`, or
2. `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib python -m pylsl.examples.{name-of-example}`

# For maintainers

## Continuous Integration

pylsl uses continuous integration and distribution. GitHub Actions will upload a new release to pypi whenever a Release is created in GitHub.
Before creating the GitHub release, be sure to bump the version number in `pylsl/version.py` and consider updating the liblsl dependency
in `.github/workflows/publish-to-pypi.yml`.

### Linux Binaries Deprecated

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

## Manual Distribution

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

# Known Issues with Multithreading on Linux

* At least for some versions of pylsl, it has been reported that running on Linux one cannot call ``pylsl`` functions from a thread that is not the main thread. This has been reported to cause access violations, and can occur during pulling from an inlet, and also from accessing an inlets info structure in a thread.
* Recent tests with mulithreading (especially when safeguarding library calls with locks) using Python 3.7.6. with pylsl 1.14 on Linux Mint 20 suggest that this issue is solved, or at least depends on your machine. See https://github.com/labstreaminglayer/pylsl/issues/29

# 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/labstreaminglayer/pylsl",
    "name": "pylsl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "networking lsl lab streaming layer labstreaminglayer data acquisition",
    "author": "Christian Kothe",
    "author_email": "christiankothe@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# pylsl\n\n![publish workflow](https://github.com/labstreaminglayer/pylsl/actions/workflows/publish-to-pypi.yml/badge.svg)\n[![PyPI version](https://badge.fury.io/py/pylsl.svg)](https://badge.fury.io/py/pylsl)\n\nThis is the Python interface to the [Lab Streaming Layer (LSL)](https://github.com/sccn/labstreaminglayer).\nLSL is an overlay network for real-time exchange of time series between applications,\nmost often used in research environments. LSL has clients for many other languages\nand platforms that are compatible with each other.\n\nLet us know if you encounter any bugs (ideally using the issue tracker on\nthe GitHub project).\n\n# Installation\n\n## Prerequisites\n\nOn all non-Windows platforms and for some Windows-Python combinations, you must first obtain a liblsl shared library. See the [liblsl repo documentation](https://github.com/sccn/liblsl) for further details.\n\n## Get pylsl from PyPI\n\n* `pip install pylsl`\n\n## Get pylsl from source\n\nThis should only be necessary if you need to modify or debug pylsl.\n\n* Download the pylsl source: `git clone https://github.com/labstreaminglayer/pylsl.git && cd pylsl`  \n* From the `pylsl` working directory, run `pip install .`.\n    * Note: You can use `pip install -e .` to install while keeping the files in-place. This is convenient for developing pylsl.\n\n# Usage\n\nSee 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}`.\n\nYou can get a list of the examples with `python -c \"import pylsl.examples; help(pylsl.examples)\"`\n\n## liblsl loading\n\n`pylsl` will search for `liblsl` first at the filepath specified by an environment variable named `PYLSL_LIB`, then in the package directory (default location for Windows), then finally in normal system library folders.\n\nIf the shared object is not installed onto a standard search path (or it is but can't be found for some [other bug](https://github.com/labstreaminglayer/pylsl/issues/48)), then we recommend that you copy it to the pylsl installed module path's `lib` subfolder. i.e. `{path/to/env/}site-packages/pylsl/lib`.\n\n* The `site-packages/pylsl` path will only exist _after_ you install `pylsl` in your Pyton environment.\n* You may have to create the `lib` subfolder.\n* Use `python -m site` to find the \"site-packages\" path.\n* Use `cp -L` on platforms that use symlinks.\n\nAlternatively, you can use an environment variable. Set the `PYLSL_LIB` environment variable to the location of the library or set `LD_LIBRARY_PATH` to the folder containing the library. For example,\n\n1. `PYLSL_LIB=/usr/local/lib/liblsl.so python -m pylsl.examples.{name-of-example}`, or\n2. `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib python -m pylsl.examples.{name-of-example}`\n\n# For maintainers\n\n## Continuous Integration\n\npylsl uses continuous integration and distribution. GitHub Actions will upload a new release to pypi whenever a Release is created in GitHub.\nBefore creating the GitHub release, be sure to bump the version number in `pylsl/version.py` and consider updating the liblsl dependency\nin `.github/workflows/publish-to-pypi.yml`.\n\n### Linux Binaries Deprecated\n\nWe recently stopped building binary wheels for Linux. In practice, the `manylinux` dependencies were often incompatible with real systems.\n\n## Manual Distribution\n\n1. Manual way:\n    1. `rm -Rf build dist *.egg-info`\n    1. `python setup.py sdist bdist_wheel`\n    1. Additional steps on Linux:\n        * `auditwheel repair dist/*.whl -w dist`\n        * `rm dist/*-linux_x86_64.whl`\n    1. `twine upload dist/*`\n1. For conda\n    1. build liblsl: `conda build ../liblsl/`\n    1. `conda build .`\n\n# Known Issues with Multithreading on Linux\n\n* At least for some versions of pylsl, it has been reported that running on Linux one cannot call ``pylsl`` functions from a thread that is not the main thread. This has been reported to cause access violations, and can occur during pulling from an inlet, and also from accessing an inlets info structure in a thread.\n* Recent tests with mulithreading (especially when safeguarding library calls with locks) using Python 3.7.6. with pylsl 1.14 on Linux Mint 20 suggest that this issue is solved, or at least depends on your machine. See https://github.com/labstreaminglayer/pylsl/issues/29\n\n# Acknowledgments\n\nPylsl 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.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python interface to the Lab Streaming Layer",
    "version": "1.16.2",
    "project_urls": {
        "Homepage": "https://github.com/labstreaminglayer/pylsl"
    },
    "split_keywords": [
        "networking",
        "lsl",
        "lab",
        "streaming",
        "layer",
        "labstreaminglayer",
        "data",
        "acquisition"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12856fa5adfebde09524836fb8dbc1d9a35f990e2048708a426dc31d0603983b",
                "md5": "e3ce41779f02a9d34f61c830f8a49619",
                "sha256": "c7ebf9e0d96fe6c18bd4966dc734060900fabadd3cf30f652b256db732add5d7"
            },
            "downloads": -1,
            "filename": "pylsl-1.16.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3ce41779f02a9d34f61c830f8a49619",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 36338,
            "upload_time": "2023-10-25T19:57:04",
            "upload_time_iso_8601": "2023-10-25T19:57:04.213394Z",
            "url": "https://files.pythonhosted.org/packages/12/85/6fa5adfebde09524836fb8dbc1d9a35f990e2048708a426dc31d0603983b/pylsl-1.16.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "675917f0b884a4ce873360bd3f694ae66ba72da410d250c006afa35452648f6e",
                "md5": "9ca32167f286790e438cc6b92256e7b8",
                "sha256": "6138b0856e8653bbad6bfd043a62315fffbd6e21528ee905d1f989dbb7299322"
            },
            "downloads": -1,
            "filename": "pylsl-1.16.2-py2.py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "9ca32167f286790e438cc6b92256e7b8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 283457,
            "upload_time": "2023-10-25T19:57:44",
            "upload_time_iso_8601": "2023-10-25T19:57:44.409045Z",
            "url": "https://files.pythonhosted.org/packages/67/59/17f0b884a4ce873360bd3f694ae66ba72da410d250c006afa35452648f6e/pylsl-1.16.2-py2.py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5cc1f0e240ffca3c993b9e817ace77b37d5f60e7a17c09788ab58b1b91d82ed",
                "md5": "e886108934d94e12871d3aad73260531",
                "sha256": "827c7b75952a83aadbd6df8dd04adff6853a75c43c17b355370153cdb7c77d9f"
            },
            "downloads": -1,
            "filename": "pylsl-1.16.2-py2.py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e886108934d94e12871d3aad73260531",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 353577,
            "upload_time": "2023-10-25T19:57:43",
            "upload_time_iso_8601": "2023-10-25T19:57:43.350117Z",
            "url": "https://files.pythonhosted.org/packages/c5/cc/1f0e240ffca3c993b9e817ace77b37d5f60e7a17c09788ab58b1b91d82ed/pylsl-1.16.2-py2.py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 19:57:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "labstreaminglayer",
    "github_project": "pylsl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pylsl"
}
        
Elapsed time: 0.30196s