Quickstart for Developers
This section provides a quick overview of the features Datatailr provides for its developers and describes a few big-picture features of being a developer in Datatailr.
Requirements
Datatailr is intended for users familiar with Python or other language in which they intend to create their runnables (Apps, Excel Addins, Services, Batch Jobs and Jupyter Notebooks). Python is a first-class citizen in Datailr, but the platform can accomodate code written in other languages as well. Developers are also expected to be familiar with the toolkits for developing their runnables, such as Streamlit, Dash, Panel and other frameworks for creating Graphic User Interfaces (GUI) and so on.
Getting Started
To get started as a Datatailr developer –
-
Before you can access Datatailr as a developer, a Datatailr administrator must define your access permissions, as described in Quickstart for Administrators – Day One.
-
You can then launch Datatailr, as described in Launching Datatailr. The following is displayed for all developers –
Note – Your Datatailr main window may also have other groups of runnables, such as Admin or user-defined groups if you have been assigned permission to those.
-
It is recommended to take the quick tour of the Datatailr Developer apps (tools), as described in Developer apps.
-
Start the Datatailr IDE by clicking its icon – you will see a loading window. If a new VM has to be brought up for your IDE, it may take a couple of minutes. Once the IDE loads, a window with Microsoft Visual Studio Code displays.
Note – If the loading progress bar does not move or an error message appears when you launch the Datatailr IDE: right click on the IDE icon, open "IDE Settings" and make sure that you have an image selected. That image will be used to run your IDE. If no images are available in the dropdown, create one in the Image Builder.
Note – The admin may have placed certain restrictions regarding the amount of CPU, Memory, Python package versions that you can use. You will not be able to exceed these restrictions without requiring admin permission or interaction with the Datatailr admin.
Tip – If needed, configure the IDE as you see fit. You may refer to Microsoft Visual Studio Code documentation for details. There is also an abundance of freely available Extensions that extend the functionality of the VS Code environment.
-
The branch in the EXPLORER pane on the left lists files in the current directory. The first time you open the IDE you will see your /home directory there, so this pane will be empty.
You should now clone a git repository with the code you’re going to develop or deploy, so that the files are listed in the EXPLORER pane on the left.-
One way to do so is from the Terminal menu. Select New Terminal, as shown below –
-
Another way is to check out your code is using the VS Code user interface, such as the Source Control button in the left pane. See VS Code documentation on Version Control for a step-by-step guide on using VS Code tools to clone your repo.
-
-
You can then click on a file name to display it in the center of the window and edit the code as necessary. For example, by clicking on app.py, its code is displayed in the editing area in the center of the window, as shown below –
- The following lines of code (__app_main__ definition) must be added to the app in order to make it runnable on Datatailr:
def __app_main__():
return application
You may refer to Hello World in Datatailr for a quick tour through a simple app developed the Datatailr and instructions about how to run it.
You can find demo examples of various Datatailr runnables in the datatailr-demos repository. Feel free to fork it and use included demos to get started with your own projects.
Reviewing the Default IDE Image
A Datatailr admin has created a default image (environment) for you to use as a starting point to begin using the Datatailr IDE, which automatically launches when you click on the Datatailr IDE icon.
This default image package contains the libraries and Python packages that admin included in it. This step is not mandatory, but when you first start using Datatailr, you may want to review this image in order to verify that the image contains all the libraries and Python packages that you require to develop your app and for your app to run.
Tip – Datatailr enables you to reconfigure any image (including the default image assigned to you) according to your own preferences, which means choosing OS and architecture, defining runtime Python version, adding or excluding external and internal Python packages and OS packages. Refer to the Image Builder page to learn more about how to rebuild (reconfigure) an image.
There are two way to set or modify a default IDE image –
-
Right click on the IDE icon and open "IDE Settings". The image selected there will be used to run your IDE. Only images that you can access according to your permissions will appear in the dropdown menu. If no images are available, create one in the Image Builder.
-
On Datatailr landing page, click the Image Manager icon. A list of the images available to you is displayed, as shown below –
Examine values in columns "Default IDE" (your personal setting) and "Global Default IDE" (global setting). When a "Default IDE" image is not set, "Global Default IDE" image is used. You can assign an image to be a "Default IDE" image by right-clicking on it and choosing the corresponding option from the context menu.
You may refer to the Image Manager section for a complete description of this window.
Updated 8 months ago