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

+
H2O Wave joins Hacktoberfest

It’s that time of the year again. A great initiative by DigitalOcean called Hacktoberfest that aims to bring

September 29, 2022 - by Martin Turoci
+
Three Keys to Ethical Artificial Intelligence in Your Organization

There’s certainly been no shortage of examples of AI gone bad over the past few

September 23, 2022 - by H2O.ai Team
+
Using GraphQL, HTTPX, and asyncio in H2O Wave

Today, I would like to cover the most basic use case for H2O Wave, which is

September 21, 2022 - by Martin Turoci
+
머신러닝 자동화 솔루션 H2O Driveless AI를 이용한 뇌에서의 성차 예측

Predicting Gender Differences in the Brain Using Machine Learning Automation Solution H2O Driverless AI 아동기 뇌인지

August 29, 2022 - by H2O.ai Team
+
Make with H2O.ai Recap: Validation Scheme Best Practices

Data Scientist and Kaggle Grandmaster, Dmitry Gordeev, presented at the Make with H2O.ai session on

August 23, 2022 - by Blair Averett
+
Integrating VSCode editor into H2O Wave

Let’s have a look at how to provide our users with a truly amazing experience

August 18, 2022 - by Martin Turoci

Start Your Free Trial