Wed 100626 Python3 library: Streamlit/App.: Hello, world!

WRITING WEB PAGES USING A MIXTURE OF: HTML/CSS/JAVASCRIPT...CAN BE RATHER LONG WINDED, AND, INDEED, RATHER LABORIOUS


I had been doing some very simple web page programming for years...; and, in order to achieve this...I used a mixture of internet technologies, namely:

- HTML/CSS/Javascript

I found it not exactly too simple or easy to have to combine using these 3 technologies together....to write programs/scripts...; however, the task is far from being impossible to achieve...it just takes an awful lot of 'time and effort'.

-----

HTML: Hello, world
 
Let's just put it this way...for me to write a simple 'Hello, world!' program using HTML/CSS/Javascript...it would take around 10/20+ lines of code. Including...

- barebone.html (html/head/title/body...meta tags/style sheet tags...header/main/footer...paragraph tags/-etc.)

 
 

-----

STREAMLIT: Hello, world!

However, in direct comparison...the steps needed to write a simple 'Hello, world!' program using Streamlit is just no more than a few lines of code...

>>
import streamlit as st
st.header("Streamlit: My 1st app...",divider=True)
st.write("Hello, world!")
st.caption("Wed 10th Jun 2026 05:03 PM GMT")
<<

...that's it.

Then, you just save the file as being called: hw01.py; and, execute it using:
> streamlit run hw01.py
...the web browser, automatically, opens and so displays the page output as:
Hello, world!



-----


SETTING UP THE 'PYTHON3/STREAMLIT' PROGRAMMING ENVIRONMENT TO WORK

There is a catch, however...; you need to set up the coding platform to work, properly, first.

This means downloading...

- Python3
- Pip (usually comes bundled with Python3) 
- setting up a virtual environment (venv)
- type: source ~/py312/bin/activate (to activate the virtual environment)
- type: deactivate (to deactivate the virtual environment)

...in addition to which you might have to install other libraries of code that Streamlit/or, your program may depend on using:

- pip install tk
- pip install matplotlib
- pip install streamlit
- pip install pandas
- pip install numpy
- pip install scipy
- etc.

Anyway, the point is this...once the program environment has already been set up...; then, you can write very brief and simple Streamlit codes...which can be 'mixed in' with all different sorts of other Python library codes.

-----

Notes

-----

NOTE(1): There is a shorter way to do things, too...; which is to use Github 'Code Spaces' where many of these things are already pre-set up for you.

NOTE(2): I must confess that I enlisted the help of AI/Artificial Intelligence chat bot search to help me figure things out whenever I got stuck.

-----

Links

-----

AI/Artificial Intelligence (code help)

- https://claude.ai
- https://copilot.microsoft.com
- https://gemini.google.com

Github

- https://www.github.com

Python (download)

- https://www.python.org

Streamlit

- https://streamlit.io
- https://www.github.com/pramnora/streamlit


-----

Hashtags

-----

#paulramnora,#pramnora,#paulramnoracoding,#python3,#streamlit







Comments