reapy.config package

Submodules

reapy.config.config module

reapy.config.config.add_web_interface(resource_path, port=2307)[source]

Add a REAPER Web Interface at a specified port.

It is added by manually editing reaper.ini configuration file, which is loaded on startup. Thus, the added web interface will only be available after restarting REAPER.

Nothing happens in case a web interface already exists at port.

Parameters:
  • resource_path (str) – Path to REAPER resource directory. Can be obtained with reapy.config.resource_path.get_resource_path().
  • port (int, optional) – Web interface port. Default=``2307``.
reapy.config.config.configure_reaper(resource_path=None, detect_portable_install=True)[source]

Configure REAPER to allow reapy connections.

Allows to use reapy from outside REAPER.

Configuration is done by manually editing reaper.ini and reaper-kb.ini. It consists in the following steps: 1. Enable usage of Python for ReaScripts. 2. Fill in path to python shared library (.dll, .dylib or .so). 3. Add a web interface on port 2307 to listen to reapy

connections.
  1. Add the ReaScript reapy.reascripts.activate_reapy_server to the Actions list.
  2. Add the name of this action to REAPER external state.

It is safe to call this function several times as it only edits configuration files when needed.

Parameters:
  • resource_path (str or None, optional) – Path to REAPER resource directory. When None, defaults to the result of reapy.config.resource_path.get_resource_path(). Use it if you already know where REAPER resource directory is located at.
  • detect_portable_install (bool, optional) – If True, this function will look for a currently running REAPER process and detect whether it is a portable install. If False, configuration files will be looked for in the default locations only, which may result in a FileNotFoundError if no global REAPER install exists. Default=``True``.
Raises:
  • RuntimeError – When detect_portable_install=True and zero or more than one REAPER instances are currently running.
  • FileNotFoundError – When detect_portable_install=False but no global configuration file can be found (which means REAPER has only been installed as portable.)
reapy.config.config.create_new_web_interface(port)[source]

Create a Web interface in REAPER at a specified port.

Deprecated since version 0.8.0: create_new_web_interface will be removed in reapy 1.0.0. Use reapy.config.add_web_interface() that works from outside REAPER.

It is added by writing a line directly in REAPER .ini file. Thus it will only be available on restart.

Parameters:port (int) – Web interface port.
reapy.config.config.delete_web_interface(resource_path, port=2307)[source]

Delete a REAPER Web Interface at a specified port.

It is deleted by manually editing reaper.ini configuration file, which is loaded on startup. Thus, the web interface stay alive until REAPER is closed.

Parameters:
  • resource_path (str) – Path to REAPER resource directory. Can be obtained with reapy.config.resource_path.get_resource_path().
  • port (int, optional) – Web interface port. Default=``2307``.
reapy.config.config.disable_dist_api()[source]

Disable distant API.

Delete reapy Web interface, and remove the ReaScript reapy.reascripts.activate_reapy_server from the Actions list.

reapy.config.config.enable_dist_api()[source]

Enable distant API.

Deprecated since version 0.8.0: enable_dist_api will be removed in reapy 1.0.0. Use reapy.config.configure_reaper() that works even from outside REAPER.

Create a Web interface and add the ReaScript reapy.reascripts.activate_reapy_server to the Actions list.

reapy.config.config.enable_python(resource_path)[source]

reapy.config.errors module

Module contents