Skip to main content

msq_test-api

AgentKit Computer-Use API

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 0.0.1
  • Package version: 0.0.4
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

pip install computer-use-api

(you may need to run pip with root permission: sudo pip install computer-use-api)

Then import the package:

import msq_test_api 

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 msq_test_api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import msq_test_api
from msq_test_api.rest import ApiException
from pprint import pprint

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.ClickMouseRequest() # ClickMouseRequest | 

try:
    # 鼠标在指定位置点击
    api_response = api_instance.click_mouse(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->click_mouse: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.DragMouseRequest() # DragMouseRequest | 

try:
    # 移动鼠标
    api_response = api_instance.drag_mouse(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->drag_mouse: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))

try:
    # 获取鼠标坐标
    api_response = api_instance.get_cursor_position()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->get_cursor_position: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))

try:
    # 获取屏幕长宽
    api_response = api_instance.get_screen_size()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->get_screen_size: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.MoveMouseRequest() # MoveMouseRequest | 

try:
    # 鼠标移动到指定位置
    api_response = api_instance.move_mouse(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->move_mouse: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.PressKeyRequest() # PressKeyRequest | 

try:
    # 按键
    api_response = api_instance.press_key(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->press_key: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.ScrollRequest() # ScrollRequest | 

try:
    # 滚动
    api_response = api_instance.scroll(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->scroll: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))

try:
    # 截屏
    api_response = api_instance.take_screenshot()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->take_screenshot: %s\n" % e)

# Configure API key authorization: ComputeUseKey
configuration = msq_test_api.Configuration()
configuration.host = "YOUR_TOOL_SERVER_URL"
configuration.api_key['X-API-Key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-Key'] = 'Bearer'

# create an instance of the API class
api_instance = msq_test_api.ComputerUseApi(msq_test_api.ApiClient(configuration))
body = msq_test_api.TypeTextRequest() # TypeTextRequest | 

try:
    # 发送文本
    api_response = api_instance.type_text(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ComputerUseApi->type_text: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
ComputerUseApi click_mouse POST /2020-04-01/ClickMouse 鼠标在指定位置点击
ComputerUseApi drag_mouse POST /2020-04-01/DragMouse 移动鼠标
ComputerUseApi get_cursor_position GET /2020-04-01/GetCursorPosition 获取鼠标坐标
ComputerUseApi get_screen_size GET /2020-04-01/GetScreenSize 获取屏幕长宽
ComputerUseApi move_mouse POST /2020-04-01/MoveMouse 鼠标移动到指定位置
ComputerUseApi press_key POST /2020-04-01/PressKey 按键
ComputerUseApi scroll POST /2020-04-01/Scroll 滚动
ComputerUseApi take_screenshot GET /2020-04-01/TakeScreenshot 截屏
ComputerUseApi type_text POST /2020-04-01/TypeText 发送文本

Documentation For Models

Documentation For Authorization

ComputeUseKey

  • Type: API key
  • API key parameter name: X-API-Key
  • Location: HTTP header

Author

Metadata

Release files for msq-test-api 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msq-test-api 0.0.4
File Size Uploaded Provenance Actions
msq_test_api-0.0.4.tar.gz 23.9 kB Without provenance Details for msq_test_api-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msq-test-api 0.0.4
File Interpreter ABI Platform Actions
msq_test_api-0.0.4-py3-none-any.whl Python 3 none any Details for msq_test_api-0.0.4-py3-none-any.whl

Total release size: 71.6 kB

Release files / msq_test_api-0.0.4.tar.gz

Download URL msq_test_api-0.0.4.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5a68c1e3ac7b9f7cc3c3125817be79c06555c713c5c86fa8b8e8fc078fc5af07
BLAKE2b-256 checksum
How to use checksums
49c43842bcb6b1d9d71055b1059978d490a1fa5d7721987d5ab012255a5bfdae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / msq_test_api-0.0.4-py3-none-any.whl

Download URL msq_test_api-0.0.4-py3-none-any.whl
Size 47.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8698b01ac62f5bead036d1a8491b409e9c9bcafca83d17d13c098f5d66b5107
BLAKE2b-256 checksum
How to use checksums
877ec4e4f3ef59be20cca5938ebe0f1fb1a9fa57c05ad2c320a6c55da2f44956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for msq-test-api 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page