Andrejus Baranovski

Subscribe to Andrejus Baranovski feed
Blog about Oracle, Full Stack, Machine Learning and Cloud
Updated: 11 hours 28 min ago

Responsive UI with Streamlit/Python

Mon, 2022-11-28 01:28
I explain how to get current UI width info in Streamlit and use this value to calculate number of columns to be generated for the form block. Streamlit is server side UI framework and it runs on Python.


Calling JavaScript from Streamlit/Python

Sun, 2022-11-20 14:30
Streamlit is Python framework, it helps to build UI with low code approach. Code runs on server and there is no functionality, which would allow to inject client side events with JavaScript. Luckily there is a 3rd-party Streamlit component, it allows to make JavaScript calls from server side Python code. Response from such JavaScript call is received within the same Streamlit execution, this makes it possible to use values returned from JavaScript in Python logic. In this example, I show one liner JavaScript call to get UI screen width, to be able to calculate layout structure adjustments in Python, based on the screen size.


Building Streamlit/Python Dynamic Forms

Sat, 2022-11-12 00:51
Streamlit is great to build Web UIs for data apps. Dynamic UIs are common requirement for data apps. Data structures usually dynamic, set of attributes is changing and this requires dynamic UI. I explain how to generate dynamic forms with Streamlit. It works very smooth.


Streamlit/Python Drawable Canvas - Element Selection (React JS)

Sun, 2022-11-06 16:05
With Streamlit component you can render canvas and draw. I explain how this canvas component implements object selection and passes data from React canvas to Streamlit.


Understanding Streamlit/Python Application Flow

Sun, 2022-10-30 15:57
Streamlit re-executes Python script, each time when the request is sent to the server. You should keep this in mind when building Streamlit apps. There are scenarios when you want to make sure code is not executed on subsequent call. You can control this with Streamlit session object.


Streamlit/Python Handling Fast Data Entry

Sun, 2022-10-23 14:30
I explain how to enable fast data entry in Streamlit with form component. By default, Streamlit input components execute server call on data change. When wrapped by form component, changes are sent to the server in batch, when Save button is pressed.


Streamlit Python/React for Image Annotation

Sun, 2022-10-16 14:16
Data annotation is important step in ML model training process. With data annotation tool you can build a dataset and use it to train or finetune the model. There are Streamlit components available to draw on top of images using canvas. In this video I explain how to use these components. How to run them locally to be able to add changes based on your own functionality requirements.


Streamlit Python App Setup

Sun, 2022-10-09 14:18
I explain my experience setting up the new Streamlit app for development. I share several best practices and hints on how to make application code readable and maintainable. I talk about the development process with Streamlit and why it is a good choice to build UI for new products.


Django Python with Oracle JET UI Table

Mon, 2022-10-03 14:10
Oracle JET provides a large set of UI components for enterprise apps. I explain how you can display data from Django with Oracle JET table. Data is injected into Django HTML template on the server side and later consumed by JET UI component.


HTMX: Events and Triggers - Django CRUD, part 5

Mon, 2022-09-26 08:16
Refreshing dependent fragments with data is a very common use case in enterprise applications. In this example, data is changed in editable form. If data is saved to DB successfully through Django backend, we raise HTMX event and with HTMX trigger refresh dependent readonly table to display the latest data.


HTMX: Saving Form Changes - Django CRUD, part 4

Wed, 2022-09-21 03:29
I explain how to run POST request through HTMX attribute on HTML form tag to save form changes to the backend. You will see how to report validation errors through HTMX response.


HTMX: Fetch Edit Form Data - Django CRUD, part 3

Sun, 2022-09-11 13:41
HTMX makes it possible to call the backend from HTML without JavaScript. You can add HTMX attribute to HTML tag, for example, button, and call backend endpoint. HTMX can process HTML fragment response and inject it into the Web page. This allows achieving partial page refresh, without full page reload.

Python Django Model Form - Django CRUD, part 2

Sun, 2022-09-04 10:25
I explain how to generate UI in Django on top of Model Form. You can define Model Form with Django Model and inherit model attributes and constraints. Model Form makes it simple not only to render the form, but also control validation and data processing phases.


Python Django CRUD part 1 - Data Model and Constraints

Sun, 2022-08-28 22:56
In this episode of Django CRUD, I will explain how to define a data model in Django and set up constraints to ensure data validity. These constraints will be applied automatically when data will be updated from the UI.


Dynamic UI in Django with Alpine.js

Mon, 2022-08-15 08:11
Django generates static HTML UI, this requires a full request submit to the server. But you can build dynamic UI's, by including and using Alpine.js library. With Alpine.js you can open dialogs, hide content or disable UI controls. This helps to improve Django app UI usability.


The old old coolness - HTMX | Execute HTTP request directly from HTML tag

Sat, 2022-08-06 13:47
Developing a modern Web app with Django and Tailwind? Thinking of using React, Vue, or another fancy JS library for UI implementation? I would recommend spending some time and trying HTMX. With HTMX you can execute partial requests and return HTML content to replace web page regions. HTMX properties are defined directly on HTML tags, this makes it easy to use and flexible.


GitHub Copilot with Django Python: Create Django Model

Sat, 2022-07-30 13:45
GitHub Copilot helps to save developer time, it can suggest common utility functions code quite well. There is no need to spend time searching on Google or StackOverflow. I love it and it works very well with Python.


Oracle JavaScript (JET) UI rendered in single HTML file

Sun, 2022-07-24 14:26
Oracle JavaScript Extension Toolkit (JET) comes with a strong set of UI components for enterprise. You can reuse these components in other UI toolkits/frameworks. In this video I show how you can run JET table components in a single HTML file, without any additional configuration in separate files.


Tailwind UI in Django with Flowbite Accordion, Table, Form

Sun, 2022-07-17 14:32
I explain my experience working with Flowbite to build prototype UI for data mapping screen with accordion, table and form components.


MLUI: Webpack, Django, JavaScript

Mon, 2022-07-04 08:24
This quick video explains how to run Webpack inside Django project to package JavaScript files into a single bundle.