Skip to main content

Restora SDK

Python bindings for BrainCo Restora devices.

Installation

pip install restora-sdk

Quick Start

import asyncio

from restora_sdk import (
    GattTransport,
    RESTORA_SERVICE_UUID,
    initialize_central_adapter,
    start_scan_with_uuids,
)


async def main() -> None:
    await initialize_central_adapter()
    await start_scan_with_uuids(
        [RESTORA_SERVICE_UUID],
        GattTransport.Auto,
    )
    await asyncio.sleep(10)


asyncio.run(main())

GattTransport.Auto accepts either Bluetooth LE or GATT over BR/EDR. Use GattTransport.Le or GattTransport.BrEdr to require a specific bearer. BR/EDR devices must be paired first; platform support and prerequisites vary by operating system.

The package also provides connection and sensor streaming APIs (connect_ble, subscribe_eeg, subscribe_imu, and subscribe_ppg), record decoding helpers, and protocol frame builders.

RR-derived HRV (RMSSD)

Create one HrvCalculator per device or session and feed it the RR intervals and confidence from each PPGData callback:

from restora_sdk import HrvCalculator

hrv = HrvCalculator()


def on_ppg(_device_id: str, data) -> None:
    rmssd_ms = hrv.update(data.rr_intervals, data.hrv_confidence)
    if rmssd_ms is not None:
        print(f"RMSSD: {rmssd_ms:.1f} ms")

The default confidence threshold is 80. The calculator accepts RR intervals from 400 through 1500 ms. After five valid intervals, it rejects a value more than 150 ms from the latest five-sample mean. It returns None until the rolling window contains 40 valid intervals, then updates for each subsequently accepted interval. This SDK-derived RMSSD does not replace or identify the algorithm used by device-firmware HRV fields.

Examples

Example projects and integration guides are maintained in the source repository under sdk/examples/python. Install this package first, then run the example that matches your device and transport mode. OSS credentials used by the record upload example are read from environment variables and are not included in the package.

Support

If you run into device connection or API issues, please share your package version, Python version, operating system, and device model with the SDK maintainer.

Metadata

Release files for restora_sdk 0.3.0

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

Built distributions (wheels)

Table of built distributions (wheels) for restora_sdk 0.3.0
File Interpreter ABI Platform
restora_sdk-0.3.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
restora_sdk-0.3.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 5.1 MB

Release files / restora_sdk-0.3.0-cp310-abi3-win_amd64.whl

Download URL restora_sdk-0.3.0-cp310-abi3-win_amd64.whl
Size 2.8 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6b010e149bef8fbde9f3674248ade0448266e2fa8685323ba1d9902222c37b5d
BLAKE2b-256 checksum
How to use checksums
9976b6ec2e9a08949b33c1ce6e8004d4cf72104fea6ba0d73f5cac5cbfc0fd15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / restora_sdk-0.3.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL restora_sdk-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
Size 2.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f4c9cd5865e78511256edcdea6e98b4b7d57b688c8362bb46fd95c79da7a443d
BLAKE2b-256 checksum
How to use checksums
17218398672e7692e6eaf512b67654ea3843782e3f5679b2bb983cd67c2459f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

1 release file

0.2.0

1 release file

0.1.0

3 release files

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