- Python 99.9%
| .forgejo/workflows | ||
| .pi/prompts | ||
| docs | ||
| examples | ||
| plan | ||
| protocol@4ee5748d49 | ||
| robustness | ||
| scripts | ||
| src/localsend | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .gitmodules | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| AGENTS.md | ||
| Justfile | ||
| LICENSE | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| typing_policy.py | ||
| uv.lock | ||
LocalSend Python
An unofficial, synchronous Python client for the LocalSend v2 protocol.
Install
From PyPI:
uv add localsend-python
To test a local build in another project, build this repository and add its wheel:
./scripts/build.sh
cd /path/to/another-project
uv add /path/to/localsend-python/dist/*.whl
The dist/ directory contains both the universal wheel and source distribution.
Logging
The library emits standard-library logging records under the localsend
namespace and does not configure application logging. Configure that logger in
your application as needed:
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger("localsend").setLevel(logging.DEBUG)
Releases
Run the Release Forgejo workflow from master. It derives a tag from the
project version, such as v0.1.0, then tests, builds, tags, and attaches both
distributions to the Forgejo release. It refuses to run if that tag already
exists. Select Publish the built artifacts to PyPI to also publish them;
that option requires a repository secret named
PYPI_API_TOKEN containing a PyPI API token.
Development
An AI Assisted implementation of the Localsend Protocol following a test first approach:
- Add project strong typing configuration and agent instructions
- Create a test harness out of Localsend protocol
- Create a step by step plan to implement the harness into a internal syncronous function implementation
- Implement plan step by step, testing against the harness, aiming to get a internal foundation for the public API
- Implement a v0 of the public API
- Implement a QA harness examples that allow testing the protocol in pratice, against a real device
- Fix all issues found during manual QA and implement missing pieces of the protocol
- Apply ruff / file breakdown, and adjust python requeriments, for better separation of concerns and make it easier to read
- Do a comparisson against official localsend app, find gaps, and document problems in
./robustness - Prepare project to be released in pypi
- Fix all
./robustnessissues, generate a QA checklist for./robustness - Add documentation
- Retest all examples, with small and large files