Pyncthing
This is a requests-based API client for Syncthing.
It's fully compatible with Syncthing v1.23.7.
Please see the full documentation on https://docs.syncthing.net/dev/rest.
Why ?
This project aims to write a simple and clean API client for desktop clients. It might be used as a backend for Syncthing-GTK in the near future.
There are 2 packages already existing: https://github.com/zhulik/aiosyncthing (a huge inspiration) and https://github.com/blakev/python-syncthing. But they are dead projects and not up to date (they don't support the PATCH API).
Installation
TODO:!
Usage
A "subdir" in the REST API is a property in pyncthing. For example,
GET /rest/cluster/pending/devices will be done via sync.cluster.pending.devices()
from pyncthing import Syncthing
sync = Syncthing("http://localhost:8384/rest")
# This endpoint does not need authentication
assert sync.noauth.health()
# This does NOT check for authentication errors.
sync.set_api_key("<YOUR API KEY RETRIEVED ON THE WEB UI>")
print(sync.system.status())
for name, path in sync.system.paths():
print(f"System path {name} is {path}")
for folder in sync.config.folders().get():
print(folder["id"], folder["label"])
# This call is blocking!
# Even next() might block if no event is coming.
# You can stop blocked calls with sync.events.stop().
# Carefull, it blocks *all* calls!
# This API will probably change in the future.
for event in sync.events():
print(event)
Thank you
- The Syncthing project for an amazing synchronization tool!
- aiosyncthing for a huge inspiration of the coding style of this project.
Metadata
Release files for pyncthing 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyncthing-0.1.0.tar.gz | 6.7 kB | Without provenance | Details for pyncthing-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyncthing-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyncthing-0.1.0-py3-none-any.whl |
Total release size: 16.7 kB
Release files / pyncthing-0.1.0.tar.gz
| Download URL | pyncthing-0.1.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fae803e3b2aed4fe7273e66abc17b7a5a8ea9472d3af2adfe34022c2e84c07c0
|
|
BLAKE2b-256 checksum How to use checksums |
90ffecdd5f17416716eb54f9602ec5355b4219d774cb65d59ae2b2270cd2dc22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Linux/6.4.9-1-MANJARO
|
Release files / pyncthing-0.1.0-py3-none-any.whl
| Download URL | pyncthing-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44e2e08b0a1b417951331bb675015bcad970b4e780f9958712b9d6c5ce37103e
|
|
BLAKE2b-256 checksum How to use checksums |
432cde2158772d83a3ca9023959f19c9deff779280726237740e2d149ec15e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.3 Linux/6.4.9-1-MANJARO
|
Security for pyncthing 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.