New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pyqube

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyqube

A Python SDK for interacting with the qube REST API and subscribing to real-time events

  • 0.2.0
  • PyPI
  • Socket score

Maintainers
1

pyqube

Qube SDK is a Python library designed for seamless interaction with the Qube REST API and subscribing to real-time events. This SDK simplifies ticket and queue management while providing an easy-to-use interface for developers.

Installation

You can install the SDK using Poetry:

poetry add pyqube

Example Usage

Here’s a brief example demonstrating how you can use the Qube SDK to interact with both the Qube API and Event Handling:

Events

import time
from pyqube import QubeClient
from pyqube.types import Ticket


def main():
    qube_client = QubeClient(api_key="your_api_key_here", location_id=1)

    @qube_client.on_ticket_generated()
    def handle_generated_ticket(ticket: Ticket):
        print(f"Generated ticket: {ticket}")

    print("Listening for events. Press Ctrl+C to exit.")
    try:
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        qube_client.disconnect()


if __name__ == "__main__":
    main()

REST API

from pyqube import QubeClient


def generate_ticket(qube_client):
    queue_id = 1
    priority = False
    ticket = qube_client.get_queue_management_manager().generate_ticket(queue_id, priority)
    print(f"Generated ticket: {ticket}")



if __name__ == '__main__':
    qube_client = QubeClient(api_key="your_api_key_here", location_id=1)
    generate_ticket(qube_client)

Explore additional usage examples and detailed workflows in the examples directory.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc