PyCharm

This chapter describes the Zato plugin for PyCharm which lets you deploy Zato services to servers directly from your IDE.

A separate chapter describes how to add code completion (IntelliSense) to the IDE.

Supported products:

  • PyCharm
  • IntelliJ Community and Ultimate with the Python plugin

Prerequisites

To enable hot-deployment from PyCharm, ensure you have first followed the prerequisite configuration instructions.

Installation

As the Zato IDE hot-deployment plugin is published in the JetBrains Plugin Repository installation on PyCharm is achieved directly from within the application.

  1. Visit Preferences -> Plugins, then click Browse repositories:

  1. Search for Zato, then click the Install button:

  1. Once installation completes, visit Preferences -> Languages & Frameworks -> Zato to populate connection information for your development cluster:

Deployment

Automatic deployment is triggered on every file save if a Python file contains a special deployment marker within its first 100 lines of source code:

# zato: ide-deploy=True

For instance:

# -*- coding: utf-8 -*-
# zato: ide-deploy=True

from zato.server.service import Service

class MyService(Service):
    def handle(self):
        pass

Alternatively, with a Zato service open in an editor window, you can also visit Tools -> Upload to default Zato server to trigger the upload manually. Success is indicated in the status bar at the bottom of the window.