Skip to main content

Asynchronous Python client for Unmanic.

Project description

codecov PyPI PyPI - Downloads GitHub

Unmanic-API

Asynchronous Python client for Unmanic.

Please note that not all features of the v2 API have been implemented, rather a few key endpoints that most users should find useful for automation.

Installing

pip install unmanic-api

Quick-Start Example

"""
Pause resume example.

Connect to Unmanic instance, pause worker "W0", wait 5 seconds and resume worker "W0".
"""
import asyncio

from unmanic_api import Unmanic

async def main():
    async with Unmanic('localhost') as unmanic:
        print(await unmanic.pause_worker("W0"))
        await asyncio.sleep(5)
        print(await unmanic.resume_worker("W0"))

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

See Also

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

unmanic_api-0.0.5.tar.gz (20.1 kB view hashes)

Uploaded Source

Built Distribution

unmanic_api-0.0.5-py3-none-any.whl (20.3 kB view hashes)

Uploaded Python 3

Supported by

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