Skip to content

Repository files navigation

queueflow

REST API for QueueFlow, a PostgreSQL-native distributed job queue and workflow engine.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.1.0
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://queueflow.dev

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import queueflow

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import queueflow

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import queueflow
from queueflow.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = queueflow.Configuration(
    host = "http://localhost:8000"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (API Key): bearerAuth
configuration = queueflow.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with queueflow.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = queueflow.CronApi(api_client)
    create_cron_request = queueflow.CreateCronRequest() # CreateCronRequest | 

    try:
        api_response = api_instance.create_cron(create_cron_request)
        print("The response of CronApi->create_cron:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CronApi->create_cron: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:8000

Class Method HTTP request Description
CronApi create_cron POST /api/v1/cron
CronApi delete_cron DELETE /api/v1/cron/{id}
CronApi get_cron GET /api/v1/cron/{id}
CronApi list_crons GET /api/v1/cron
CronApi pause_cron POST /api/v1/cron/{id}/pause
CronApi resume_cron POST /api/v1/cron/{id}/resume
DlqApi get_dead_letter GET /api/v1/dlq/{id}
DlqApi list_dead_letters GET /api/v1/dlq
DlqApi replay_dead_letter POST /api/v1/dlq/{id}/replay
HealthApi get_health GET /health
HealthApi get_ready GET /ready
JobsApi cancel_job POST /api/v1/jobs/{id}/cancel
JobsApi create_batch_jobs POST /api/v1/jobs/batch
JobsApi create_job POST /api/v1/jobs
JobsApi get_job GET /api/v1/jobs/{id}
JobsApi list_jobs GET /api/v1/jobs
JobsApi stream_job_events GET /api/v1/jobs/{id}/events Stream a job's status transitions as Server-Sent Events until it reaches a terminal state. Lets clients await completion without polling the REST endpoint themselves.
SystemApi get_stats GET /api/v1/stats
SystemApi list_tasks GET /api/v1/tasks
WorkerApi complete_job POST /api/v1/jobs/{id}/complete
WorkerApi fail_job POST /api/v1/jobs/{id}/fail
WorkerApi heartbeat_job POST /api/v1/jobs/{id}/heartbeat
WorkerApi lease_jobs POST /api/v1/queues/{queue}/lease
WorkflowsApi cancel_workflow POST /api/v1/workflows/{id}/cancel
WorkflowsApi create_workflow POST /api/v1/workflows
WorkflowsApi get_workflow GET /api/v1/workflows/{id}
WorkflowsApi get_workflow_diagram GET /api/v1/workflows/{id}/diagram
WorkflowsApi list_workflows GET /api/v1/workflows

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (API Key)

Author

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages