Skip to main content

yousleep-common

The youSleep Portal for Python: a typed, asynchronous client for the REST API, the models its requests and responses are made of, and the tools an analysis container uses to read its manifest and write its result.

pip install yousleep-common
from yousleep_common.client import AsyncClient
from yousleep_common.models import UserAuthentication

client = await AsyncClient.from_credentials(
    base_url="https://api.yousleep.ai",
    # The email and password you sign in to the portal with.
    credentials=UserAuthentication(email="you@example.com", password="…"),
)
async with client:
    result = await client.workflows.analyze_file(
        file="night.edf", analysis_config_id="u-sleep-research-v2"
    )
    print(result.biomarkers.biomarkers.tst_min, len(result.events))

One call uploads the recording, submits the analysis, waits for it and returns the events and statistics it produced. analyze_files does the same for a batch, one outcome per file; the namespaced endpoints (client.projects, client.analyses, …) are the same operations one level down.

Documentation: docs.yousleep.ai carries the SDK guides, the generated API reference, and how to package an analysis to run on the platform. The installed package resolves every signature offline, so help() and an IDE work without it.

Command line. yousleep-init starts an analysis project that passes the conformance check as generated, yousleep-verify runs that check on an image (and with --meter measures its memory against recording length), and yousleep-manifest writes the manifest a container reads for a hand run.

Python 3.11 or later. Every GitHub release also attaches the wheel as an asset, the copy to install from when PyPI's index has not caught up.

Research use. youSleep is for research and other non-commercial use; nothing here is a medical device.

Licensed under Apache-2.0. Contact: contact@yousleep.ai.

Metadata

Release files for yousleep-common 56.0.0

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

Built distribution (wheel)

Table of built distributions (wheels) for yousleep-common 56.0.0
File Interpreter ABI Platform Actions
yousleep_common-56.0.0-py3-none-any.whl Python 3 none any Details for yousleep_common-56.0.0-py3-none-any.whl

Release files / yousleep_common-56.0.0-py3-none-any.whl

Download URL yousleep_common-56.0.0-py3-none-any.whl
Size 400.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3005d9c2787b2a1c63ba6343a2f2b5787f09a0c85b36831aa92ce1709cb2cc4c
BLAKE2b-256 checksum
How to use checksums
1c579ca4e48e9c4ff6eba52010dd7844764077a0281b658d8102d6ef2bc5e2d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for yousleep-common 56.0.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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for yousleep_common-56.0.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

56.0.0 This release

1 release file Full provenance

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