Skip to main content

Python stubs for Open RV

Project description

Open RV Python Stubs

Type annotated stubs for Open RV's Python API. Work in progress so use at your own risk!

Should be compatible with paid RV as the code base for both Open RV and RV should be from the same source (excluding specific changes for RV that is not available to public).

Currently missing docstring explanation so refer to the built-in help menu:

mu_menu.png

Fun Trivia: The rv.commands is a wrapper for Mu commands:

mu_api_browser.png

Quick setup

Copy commands.pyi to <openrv_path>/PlugIns/Python/rv. Take note the PlugIns name can also be plugins or Plugins. Guess it is a quirk for supporting cross-platform application between Linux, macOS and Windows.

openrv_plugins_path.png

PyCharm should automatically detect the .pyi stubs and provide autocompletion with type hints:

pycharm_autocomplete.gif

TODO

  1. Publish to PyPI.
  2. Implement the other RV modules with type hints.

Rant

  1. There is no way to browse the Mu's manual outside the API browser despite it being a Qt Web Browser. Need to write a parser that analyse the docs from Open RV's source code to generate the docstring for the respective Mu's command. Not sure on the legality on 'scrapping' the source code docstring but navigating the Mu's API Browser is hellish.
  2. The current stubs is manually hand-generated but suffice for my requirements for PyCharm/VS Code to autocomplete and provide the required type hints.
  3. Yet another Python stubs. At least this ease my frustration when writing Python tools that requires interaction with Open RV.

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

openrv_stubs-0.0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

openrv_stubs-0.0.1-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file openrv_stubs-0.0.1.tar.gz.

File metadata

  • Download URL: openrv_stubs-0.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for openrv_stubs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e780c9015fe7c51824b69d417f335defd56e0dc2e2e2fd1e82fed8e9fc02e1d0
MD5 12f719248c208f18f0f1d6daf48d8349
BLAKE2b-256 5ee92137b90522d2052df7943d03cd6634cdd88cb7c64288d4414f34e9fbda48

See more details on using hashes here.

File details

Details for the file openrv_stubs-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: openrv_stubs-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for openrv_stubs-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d617250900a8713c2000262a062b8b85cc04a1499df46082f289f6e41b73176d
MD5 30d669600efd0d4ad7f3ab1119ffc593
BLAKE2b-256 8de112fc5223a7a2be94e226da9bf7ee5184c1c248b37bef5358547fa822bb60

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