Skip to main content

Wrapper for Polymatica API

Project description

# Основные сведения Библиотека предназначена для работы с Polymatica API.

# Работа с библиотекой Основным модулем бизнес-логики является файл business_scenarios.py, импортировать который можно с помощью команды from polymatica import business_scenarios as sc.

Модуль предоставляет два класса для работы с Полиматикой - BusinessLogic и GetDataChunk. Методы этих классов можно посмотреть при помощи стандартной функции dir().

Аргументы функций и прочую docstring-документацию модуля и функций можно посмотреть при помощи стандартной функции help().

### Инициализация нового клиентского подключения: session = sc.BusinessLogic(login="your_login", password="your_password", url="polymatica_server_url", **args)

### Пример создания слоя и воспроизведения сценария на этом слое с использованием PolyAPI

Создадим слой: session.execute_manager_command(command_name="user_layer", state="create_layer")

Запросим список сценариев: session.execute_manager_command(command_name="scripts", state="get_script_descriptions_list")

Загрузим сценарий на слой, используя полученные на предыдущих шагах идентификаторы слоя и сценария: session.execute_manager_command(command_name="scripts", state="load_on_layer", runtime_id="d46b7075", script_id="40fc65db", on_load_action=0)

Воспроизведем сценарий: session.execute_manager_command(command_name="scripts", state="play_to_position", runtime_id="d46b7075", script_id="40fc65db", play_to_position=23, clear_workspace=True)

Получим статус воспроизведения сценария: session.execute_manager_command(command_name="scripts", state="get_script_status", runtime_id="d46b7075")

Получили ответ, из которого видим, что сценарий воспроизведен успешно: {'state': 1, 'queries': [{'uuid': '872bdbde-20b9f734-2a5a5ad5-9b08e670', 'command': {'plm_type_code': 227, 'state': 6, 'script_status': {'id': '40fc65db', 'action_name': '', 'status': 3, 'current_step': 24, 'steps_count': 24, 'errors': []}}}]}

Получим информацию о слое: session.execute_manager_command(command_name="user_layer", state="get_layer", layer_id="d46b7075")

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

polyapi-5.9.21.tar.gz (192.9 kB view details)

Uploaded Source

Built Distribution

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

polyapi-5.9.21-py3-none-any.whl (208.1 kB view details)

Uploaded Python 3

File details

Details for the file polyapi-5.9.21.tar.gz.

File metadata

  • Download URL: polyapi-5.9.21.tar.gz
  • Upload date:
  • Size: 192.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for polyapi-5.9.21.tar.gz
Algorithm Hash digest
SHA256 b16935d94916d5c01349b300f58f53865e9a8b352a1ec9e2c4a0fd102f65695e
MD5 3a7bb2e9c5be18bb8fb7f487b68aac25
BLAKE2b-256 da645cf1f8d9666a1db560a6bd34120777f987943f86abb5bf9e11ccfbd99f20

See more details on using hashes here.

File details

Details for the file polyapi-5.9.21-py3-none-any.whl.

File metadata

  • Download URL: polyapi-5.9.21-py3-none-any.whl
  • Upload date:
  • Size: 208.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for polyapi-5.9.21-py3-none-any.whl
Algorithm Hash digest
SHA256 55b565254ee046795a2fa0a04af0cb2386e937d8666aead97dcd1ad6fbfd48ee
MD5 8bfacb471986829906dbfd99663975b3
BLAKE2b-256 cc8eb0edfbcbb89886349dedfb6147cbaf7e4603e155d1bc0299eda4a98f3d47

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