Skip to main content

Latest PyPI Release Latest Conda Release Python 3.10+ License

PyXDF

PyXDF is a Python importer for XDF files.

Sample usage

The following example loads minimal.xdf (which you can download from here) and prints/plots all markers:

import matplotlib.pyplot as plt
import numpy as np

import pyxdf

data, header = pyxdf.load_xdf("minimal.xdf")

for stream in data:
    y = stream["time_series"]

    if isinstance(y, list):
        # list of strings, draw one vertical line for each marker
        for timestamp, marker in zip(stream["time_stamps"], y):
            plt.axvline(x=timestamp)
            print(f'Marker "{marker[0]}" @ {timestamp:.2f}s')
    elif isinstance(y, np.ndarray):
        # numeric data, draw as lines
        plt.plot(stream["time_stamps"], y)
    else:
        raise RuntimeError("Unknown stream format")

plt.show()

Note that you need to have matplotlib installed to run this example (which is not a dependency of PyXDF itself).

Command line interface (CLI)

PyXDF has a command line interface (CLI) with the following commands:

  • print_metadata will print basic metadata for each found stream.
    • python -m pyxdf.cli.print_metadata -f=/path/to/my.xdf
  • playback_lsl will open an XDF file, then replay its data in an infinite loop, but using current timestamps (this is useful for prototyping online processing):
    • python -m pyxdf.cli.playback_lsl /path/to/my.xdf --loop

Installation

The latest stable version can be installed with pip install pyxdf.

For the latest development version, use pip install git+https://github.com/xdf-modules/pyxdf.git.

For maintainers

As soon as a new release is created on GitHub (using a tag labeled e.g. v1.16.3), a PyPI package is automatically created with the version number matching the release tag.

Metadata

Release files for pyxdf 1.18.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyxdf 1.18.0
File Size Uploaded Provenance Actions
pyxdf-1.18.0.tar.gz 38.0 kB Without provenance Details for pyxdf-1.18.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyxdf 1.18.0
File Interpreter ABI Platform Actions
pyxdf-1.18.0-py3-none-any.whl Python 3 none any Details for pyxdf-1.18.0-py3-none-any.whl

Total release size: 58.8 kB

Release files / pyxdf-1.18.0.tar.gz

Download URL pyxdf-1.18.0.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9aa78f3c7c50020f0fa30a04f094d7966b3eefde570e488d3ddef40de5c00f31
BLAKE2b-256 checksum
How to use checksums
9d28298505b91f5e6b9325f94e1cc25003fc3cc8dc7073506f30149dfe8bd247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyxdf-1.18.0-py3-none-any.whl

Download URL pyxdf-1.18.0-py3-none-any.whl
Size 20.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e78ca4c45fdb7f1e0c014f3c4501b5354fe5b8f8fd8ec427cfce577b2592b551
BLAKE2b-256 checksum
How to use checksums
dcf53466677c07801f6a8d7e845660b17b5093fe82f07129db75b7537799d15e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pyxdf 1.18.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page