Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Nicer way to create ThingClients and interact with server.

Open
#265 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
fastapi, python
Domain
api, backend

Research direction

Start by reading the existing ThingClient.from_url flow and how Thing Descriptions are discovered. Define the connection API around a shared HTTP client, listing available things and creating ThingClients from the server. Done means the proposed usage can discover server things and reuse one connection for multiple clients.

Written by the indexing model from the issue text.

Description

We can use ThingClient.from_url but f we have lots of things on the same server then we want to use the same httpx.Client, but actually knowing what is on the server we can looks the Thing Descriptions. It may be nice to have some form of LabThingsClient or ServerConnection or something with a better name so I create a connection and ask that connection for the ThingClients in cleaner code:

>>> microscope = lt.remote_connection("http://microscope.local:5000")
>>> microscope.available_things
["camera", "stage", "syestem"]
>>> stage_client = microscope.get_thing_client("camera")
>>> stage_client.position
{"x": 0, "y": 0, "z": 0}
Dominant language
Python
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from labthings/labthings-fastapi

All issues in labthings/labthings-fastapi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.