March 24th, 2022

H2O Wave Snippet Plugin for PyCharm

RSS icon RSS Category: Tutorials, Wave

Note: this blog post by Shamil Dilshan Prematunga was first published on Medium.

What is PyCham?

PyCharm is the most famous IDE among software developers who are working based on python language. It contains more features such as code analysis, graphical debugger, integrated unit tester, integrated version control system, and supports data science with Anaconda. It is also a cross-platform with Windows, macOS, and Linux versions.

Plugins in PyCharm

Plugins in PyCharm extend its core functionalities and give a smooth programming experience to the programmer. As an example, by using these plugins we can add some features such as coding assistance support for various languages and frameworks, shortcut hints, live previews, integration with version control systems, etc. In the plugin market space in PyCharm, we can find various plugins for different purposes.

Figure 1 – PyCharm Plugins Market Place

There are multiple ways to add plugins in PyCharm.

1. Install plugins from Marketplace

  • Open IDE settings and select Plugins.
  • Find plugins in the marketplace and click install.

2. Install plugin from disk

  • Download the plugin in ZIP or JAR format.
  • Open IDE settings and select Plugins.
  • Click on settings and then click “Install Plugin from Disk”.
  • Select the plugin archive file and click OK.
  • Click OK to apply changes and restart IDE.

Same as the install plugins we can remove or disable them in a project. This is also simple as installing plugins. To perform this, open the IDE settings and select plugins to list down installed plugins. Click on the one we need to remove or disable. In the plugin’s description pane click on Uninstall or Disable. Now it is done!

H2O Wave Plugin

We can define H2O wave as an open-source Python development framework used to develop real-time interactive AI apps. Having a plugin for this kind of platform will make it super easier for the developers who are working with wave application developments. With that perspective, H2O has released H2O Snippet as the plugin for PyCharm. It is available in the marketplace to directly install, or we can install it via this link. Once after installation, restart the IDE to effect the changes.

Figure 2 – H2O Wave Plugin in Market Place

Once after successful installation, we can use it super easily in PyCharm. All we need to do is create a Python file and start experiencing the easiness of the plugin. Typing the letter “w” at the very beginning of the python file will suggest us a list of things we can access via the plugin.

Figure 3 – Auto Suggestions

To demonstrate the easiness, I’ll show how we can interact with this plugin. In most of the applications, we have our header component. In the list of example codes suggested by the wave snippet plugin, we can find it there. After one click, the code will be loaded to the file. It is easy and we no need to code it from the scratch.

Figure 4 – Load Example Code

Another super cool thing that we can experience through this plugin is how easy to interact with cards and components. I’ll demonstrate it by extending the above code.

Now just think that you want to add a button in the wave application, but you don’t know how to apply it and what are the required fields. Here is the plugin with you. Just type “w_button” and see the suggestions.

Figure 5 – Element Auto Suggestions

“w_button” is the option with minimal conditions required to a button. If you need to customize the button with more features click on “w_full_button” which gives all supported attributes to edit.

Figure 6 – Suggest Elements with Full Attributes

Another benefit we can achieve by using the wave plugin is, it suggests all the icons we can use within the application. Therefore, we no need to spend our time searching for the availability of these items. It is demonstrated below by extending the same example used in the previous section.

Figure 7 – Auto Icon Suggestions

Another specific feature covered with this plugin is, it reminds us of what we already defined for a client within the code. We no need to remind all of them while we are working with a long codebase. As a demonstration of the above point, the code I used previously can be used as below.

Figure 8 – Auto Suggest Definitions

In this way, they made it easier for a developer to easily interact with features in H2O Wave by providing custom code snippets and advanced autocomplete features along with the PyCharm plugin.

Figure 9 – H2O Wave Plugin Summary

For more information regarding this content, you can refer to the below references.

Try this awesome plugin and witness how cool H2O Wave is.

About the Author

Shamil Prematunga

Shamil is a Software Engineer at H2O mainly working on wave application development to provide a better experience of AI to the users. He is passionate about delivering AI-based solutions to real-life problems and sharing them with the open-source community.

Leave a Reply

Developing and Retaining Data Science Talent

It’s been almost a decade since the Harvard Business Review proclaimed that “Data Scientist” is

May 12, 2022 - by Jon Farland
The Wildfire Challenge Winners Blog Series – Team Too Hot Encoder

Note: this is a community blog post by Team Too Hot Encoder - one of

May 10, 2022 - by Team
The Wildfire Challenge Winners Blog Series – Team HTB

Note: this is a community blog post by Team HTB - one of the

May 10, 2022 - by Team
Bias and Debiasing

An important aspect of practicing machine learning in a responsible manner is understanding how models

April 15, 2022 - by Kim Montgomery
Comprehensive Guide to Image Classification using H2O Hydrogen Torch

In this article, we will learn how to build state-of-the-art models in computer vision and

March 29, 2022 - by Team
Democratizing Lending through AI

According to the Federal Reserve, nearly 40% of adults in the U.S. sought credit in

March 23, 2022 - by Team

Start Your Free Trial