Skip to main content

Library to interact with qcentroid agent api

Project description

qcentroid-agent-cli

deploy to pypi Python PyPI

Client library to interact with qcentroid agent API.

Functions

Functions:

  • obtain status, and context
  • obtain input data
  • send output data
  • set status
  • send execution logs

Install

pip install qcentroid-agent-cli

Use

As external agent:

from qcentroid-agent-cli import QCentroidSolverClient
base_url="https://api.qcentroid.xyz"
api_key="1234-4567-8910"
solver_id="123"

def main():
    
    print("Hello QCentroid Agent!")
    solver = QCentroidSolverClient(base_url, api_key, solver_id)

    while True: # put some escape function
        response = solver.obtainJob()

        if response is not None:
            execute_on_response(response)

        # Wait for 1 minute before the next iteration
        time.sleep(60)
   

if __name__ == "__main__":
    main()

As agent:

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

qcentroid_agent_cli-0.3.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qcentroid_agent_cli-0.3.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file qcentroid_agent_cli-0.3.2.tar.gz.

File metadata

  • Download URL: qcentroid_agent_cli-0.3.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for qcentroid_agent_cli-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2d34651d089953c7221ed1a1229ba9a9f83f8f5556b438cf8bae57cf8b00ab5c
MD5 46e04fe24ccc990ce3e2c8d4eaa8032a
BLAKE2b-256 24c4cbac7439e82fa6bfb5f4403507fdd71e4a31d6e7f72c86024c5283428687

See more details on using hashes here.

File details

Details for the file qcentroid_agent_cli-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for qcentroid_agent_cli-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c4dfe02c512e37f9bb927ab9075dec835fbdd975f4075e971ec0a2c46664cf06
MD5 4373f8a9433c4bcc6ec0cfa2ab4eb61d
BLAKE2b-256 590dc884f0e85a9df00f76f7fdb4eb57042379213372c70adbf49575f842f83d

See more details on using hashes here.

Supported by

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