Skip to main content

An implementation of LabThings using FastAPI

Reason this release was yanked:

We discovered a bug that breaks settings loading.

Project description

codecov Documentation Status

labthings-fastapi

A FastAPI based library to implement a Web of Things interface for laboratory hardware using Python. This is a ground-up rewrite of python-labthings, based on FastAPI and Pydantic. It is the underlying framework for v3 of the OpenFlexure Microscope software.

Documentation, including install instructions, is available on readthedocs.

Installation

See readthedocs for installation instructions that are automatically tested. You can install this package with pip install labthings-fastapi.

Developer notes

For the latest development version, clone this repository and run pip install -e .[dev].

The code is linted with ruff ., type checked with mypy, and tested with pytest. These all run in CI with GitHub Actions. We recommend a pre-commit hook to ensure ruff passes on every commit. flake8 is also run in CI, primarily to enable stricter checks on docstrings. It is run as flake8 src. ruff and flake8 are both configured from pyproject.toml.

All changes to the codebase should go via pull requests, and should only be merged once all the checks in the test job are passing. It is preferable to merge code where the test-with-unpinned-dependencies job fails, and deal with the dependency issues in another PR, particularly where the required changes are distinct from the code in the PR.

Dependencies are defined in pyproject.toml and can be compiled to dev-requirements.txt with:

uv pip compile --extra dev pyproject.toml --output-file dev-requirements.txt

If you're not using uv, just regular pip-compile from pip-tools should do the same thing.

Demo

See readthedocs for a runnable demo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labthings_fastapi-0.0.15.tar.gz (127.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labthings_fastapi-0.0.15-py3-none-any.whl (152.3 kB view details)

Uploaded Python 3

File details

Details for the file labthings_fastapi-0.0.15.tar.gz.

File metadata

  • Download URL: labthings_fastapi-0.0.15.tar.gz
  • Upload date:
  • Size: 127.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for labthings_fastapi-0.0.15.tar.gz
Algorithm Hash digest
SHA256 0fc0903b46dcdfa2a20cad1473718abf806cf355c71aa75ee9b00573df052335
MD5 6f3e5a5c2d5f9fab97a52ba2d5ca605a
BLAKE2b-256 bcc19f1e91e24f0c3c6b78325acfa24b07e7800a7926a429249909afb50a7d1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for labthings_fastapi-0.0.15.tar.gz:

Publisher: publish.yml on labthings/labthings-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file labthings_fastapi-0.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for labthings_fastapi-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 cf72a9a2b32a77bda12288aed5e55d71c47f1f5941c44b05c491a75e17fbefd6
MD5 c58aead25861c2d2eab75f47d7de10df
BLAKE2b-256 9c9aed5ab5cbda367cb4830adc9475949b1e1cdd81555189308be0cb6315aa33

See more details on using hashes here.

Provenance

The following attestation bundles were made for labthings_fastapi-0.0.15-py3-none-any.whl:

Publisher: publish.yml on labthings/labthings-fastapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page