syncthing2


Namesyncthing2 JSON
Version 2.4.5 PyPI version JSON
download
home_pagehttps://github.com/blakev/python-syncthing
SummaryPython bindings to the Syncthing REST interface, targeting v0.14.44
upload_time2023-04-27 12:48:46
maintainer
docs_urlNone
authorBlake VandeMerwe
requires_python
licenseThe MIT License
keywords syncthing sync rest backup api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            python-syncthing
================

[![pypi](https://img.shields.io/pypi/v/syncthing.svg?style=flat)](https://pypi.python.org/pypi/syncthing)
[![Syncthing](https://img.shields.io/badge/syncthing-0.14.44-blue.svg?style=flat)](https://syncthing.net)
[![Documentation Status](https://readthedocs.org/projects/python-syncthing/badge/?version=latest)](http://python-syncthing.readthedocs.io/en/latest/?badge=latest)
[![MIT License](https://img.shields.io/github/license/blakev/python-syncthing.svg?style=flat)](https://github.com/blakev/python-syncthing/blob/master/LICENSE)


Python bindings to the Syncthing REST interface.

- [Python API Documentation](http://python-syncthing.readthedocs.io/en/latest/)
- [Syncthing](https://syncthing.net/)
- [Syncthing REST Documentation](https://docs.syncthing.net/dev/rest.html)
- [Syncthing Forums](https://forum.syncthing.net/)


```bash
$ pip install syncthing
```

## Getting Started

```python
from syncthing import Syncthing

API_KEY = "..."

s = Syncthing(API_KEY)

# name spaced by API endpoints
s.system.connections()

# supports GET/POST semantics
sync_errors = s.system.errors()
s.system.clear()

if sync_errors:
    for e in sync_errors:
        print(e)

# supports event long-polling
event_stream = s.events(limit=10)
for event in event_stream:
    # do something with `event`
    if event_stream.count > 100:
        event_stream.stop()
```

## Running Tests

The API doctests rely on the following function to run against your instance.
None of the "breaking" calls will be tested. You must set the following environment
variables otherwise all tests will fail.

```python
def _syncthing():
    KEY = os.getenv('SYNCTHING_API_KEY')
    HOST = os.getenv('SYNCTHING_HOST', '127.0.0.1')
    PORT = os.getenv('SYNCTHING_PORT', 8384)
    IS_HTTPS = bool(int(os.getenv('SYNCTHING_HTTPS', '0')))
    SSL_CERT_FILE = os.getenv('SYNCTHING_CERT_FILE')
    return Syncthing(KEY, HOST, PORT, 10.0, IS_HTTPS, SSL_CERT_FILE)
```

## License

> The MIT License (MIT)
>
> Copyright (c) 2015-2017 Blake VandeMerwe
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/blakev/python-syncthing",
    "name": "syncthing2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "syncthing,sync,rest,backup,api",
    "author": "Blake VandeMerwe",
    "author_email": "blakev@null.net",
    "download_url": "https://files.pythonhosted.org/packages/b3/a5/926466dbe1209870c0c808f8974fca46a0f0e8ba94f9bc4cec8be70aaaef/syncthing2-2.4.5.tar.gz",
    "platform": null,
    "description": "python-syncthing\n================\n\n[![pypi](https://img.shields.io/pypi/v/syncthing.svg?style=flat)](https://pypi.python.org/pypi/syncthing)\n[![Syncthing](https://img.shields.io/badge/syncthing-0.14.44-blue.svg?style=flat)](https://syncthing.net)\n[![Documentation Status](https://readthedocs.org/projects/python-syncthing/badge/?version=latest)](http://python-syncthing.readthedocs.io/en/latest/?badge=latest)\n[![MIT License](https://img.shields.io/github/license/blakev/python-syncthing.svg?style=flat)](https://github.com/blakev/python-syncthing/blob/master/LICENSE)\n\n\nPython bindings to the Syncthing REST interface.\n\n- [Python API Documentation](http://python-syncthing.readthedocs.io/en/latest/)\n- [Syncthing](https://syncthing.net/)\n- [Syncthing REST Documentation](https://docs.syncthing.net/dev/rest.html)\n- [Syncthing Forums](https://forum.syncthing.net/)\n\n\n```bash\n$ pip install syncthing\n```\n\n## Getting Started\n\n```python\nfrom syncthing import Syncthing\n\nAPI_KEY = \"...\"\n\ns = Syncthing(API_KEY)\n\n# name spaced by API endpoints\ns.system.connections()\n\n# supports GET/POST semantics\nsync_errors = s.system.errors()\ns.system.clear()\n\nif sync_errors:\n    for e in sync_errors:\n        print(e)\n\n# supports event long-polling\nevent_stream = s.events(limit=10)\nfor event in event_stream:\n    # do something with `event`\n    if event_stream.count > 100:\n        event_stream.stop()\n```\n\n## Running Tests\n\nThe API doctests rely on the following function to run against your instance.\nNone of the \"breaking\" calls will be tested. You must set the following environment\nvariables otherwise all tests will fail.\n\n```python\ndef _syncthing():\n    KEY = os.getenv('SYNCTHING_API_KEY')\n    HOST = os.getenv('SYNCTHING_HOST', '127.0.0.1')\n    PORT = os.getenv('SYNCTHING_PORT', 8384)\n    IS_HTTPS = bool(int(os.getenv('SYNCTHING_HTTPS', '0')))\n    SSL_CERT_FILE = os.getenv('SYNCTHING_CERT_FILE')\n    return Syncthing(KEY, HOST, PORT, 10.0, IS_HTTPS, SSL_CERT_FILE)\n```\n\n## License\n\n> The MIT License (MIT)\n>\n> Copyright (c) 2015-2017 Blake VandeMerwe\n>\n> Permission is hereby granted, free of charge, to any person obtaining a copy\n> of this software and associated documentation files (the \"Software\"), to deal\n> in the Software without restriction, including without limitation the rights\n> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n> copies of the Software, and to permit persons to whom the Software is\n> furnished to do so, subject to the following conditions:\n> The above copyright notice and this permission notice shall be included in all\n> copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n",
    "bugtrack_url": null,
    "license": "The MIT License",
    "summary": "Python bindings to the Syncthing REST interface, targeting v0.14.44",
    "version": "2.4.5",
    "split_keywords": [
        "syncthing",
        "sync",
        "rest",
        "backup",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4aadc19f893919baae7147cb621732cb67a3b0c1872d5ff6e88b59f194bd1bdb",
                "md5": "606f297cbd26e814e002cf5aaced141c",
                "sha256": "33b1e6fa1a36a885109727d0c61f3b1a06fd962f07da747e0a9d0ca7198befef"
            },
            "downloads": -1,
            "filename": "syncthing2-2.4.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "606f297cbd26e814e002cf5aaced141c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14748,
            "upload_time": "2023-04-27T12:48:43",
            "upload_time_iso_8601": "2023-04-27T12:48:43.517018Z",
            "url": "https://files.pythonhosted.org/packages/4a/ad/c19f893919baae7147cb621732cb67a3b0c1872d5ff6e88b59f194bd1bdb/syncthing2-2.4.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b3a5926466dbe1209870c0c808f8974fca46a0f0e8ba94f9bc4cec8be70aaaef",
                "md5": "c7ef711a754c857114a43fbdd557be91",
                "sha256": "42c2cd2ad42f8d6932c2e4cb16da937152bf4a1cfd47a25cc173a258c09bb4b3"
            },
            "downloads": -1,
            "filename": "syncthing2-2.4.5.tar.gz",
            "has_sig": false,
            "md5_digest": "c7ef711a754c857114a43fbdd557be91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14783,
            "upload_time": "2023-04-27T12:48:46",
            "upload_time_iso_8601": "2023-04-27T12:48:46.148017Z",
            "url": "https://files.pythonhosted.org/packages/b3/a5/926466dbe1209870c0c808f8974fca46a0f0e8ba94f9bc4cec8be70aaaef/syncthing2-2.4.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-27 12:48:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "blakev",
    "github_project": "python-syncthing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "syncthing2"
}
        
Elapsed time: 0.07063s