![codecov](https://codecov.io/gh/elda27/async_rundeck/branch/main/graph/badge.svg?token=wo3QBnKsKX)
Asynchronous rundeck API client
This is a rundeck API client implemeneted by aio-http and pydantic.
All API parameters and responses are annotated and user-friendly!
Installation
pip install async-rundeck
How to use
import asyncio
from async_rundeck import Rundeck
async def main():
Rundeck(
url=rundeck_service, username="admin", password="admin", api_version=41
)
project_name = uuid4().hex
await rundeck.create_project(project_name)
job_content = (root_dir / "resource" / "Test_job.xml").read_text()
status = await rundeck.import_jobs(
project_name,
job_content,
content_type="application/xml",
uuid_option="remove",
)
if len(status["succeeded"]) != 1:
print("Failed to import job")
return
jobs = await rundeck.list_jobs(project_name)
execution = await rundeck.execute_job(jobs[0].id)
assert execution is not None
asyncio.run_until_complete(main())
Features
The items checked in the following list are implemented.