<p><span>Transition from a back-end developer to a full-stack developer with knowledge of all the dimensions of web application development, namely, front-end, back-end and server-side software. This book provides a comprehensive overview of Streamlit, allowing developers and programmers of all back
Web Application Development with Streamlit: Develop and Deploy Secure and Scalable Web Applications to the Cloud Using a Pure Python Framework
✍ Scribed by Mohammad Khorasani, Mohamed Abdou, Javier Hernández Fernández
- Publisher
- Apress
- Year
- 2022
- Tongue
- English
- Leaves
- 498
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Transition from a back-end developer to a full-stack developer with knowledge of all the dimensions of web application development, namely, front-end, back-end and server-side software. This book provides a comprehensive overview of Streamlit, allowing developers and programmers of all backgrounds to get up to speed in as little time as possible.
Streamlit is a pure Python web framework that will bridge the skills gap and shorten development time from weeks to hours. This book walks you through the complete cycle of web application development, from an introductory to advanced level with accompanying source code and resources. You will be exposed to developing basic, intermediate, and sophisticated user interfaces and subsequently you will be acquainted with data visualization, database systems, application security, and cloud deployment in Streamlit.
In a market with a surplus demand for full stack developers, this skill set could not possibly come at a better time. In one sentence, Streamlit is a means for the empowerment of developers everywhere and all stand to gain from it.
What You’ll Learn
- Mutate big data in real-time
- Visualize big data interactively
- Implement web application security and privacy protocols
- Deploy Streamlit web applications to the cloud using Streamlit, Linux and Windows servers
Who is this Book for?
Developers with solid programming experience wanting to learn Streamlit; Back-end developers looking to upskill and transition to become a full-stack developers; Those who wish to learn and become more acquainted with data visualization, database systems, security and cloud deployment with Steamlit
✦ Table of Contents
Table of Contents
About the Authors
About the Technical Reviewers
Acknowledgments
Preface
Acronyms
Intended Audience
Additional Material
Chapter 1: Getting Started with Streamlit
1.1 Why Streamlit?
1.1.1 Local vs. the Cloud
1.1.2 A Trend Toward Cloud Computing
1.1.3 History of Web Frameworks in Python
1.1.4 Flask
1.1.5 Django
1.1.6 Dash
1.1.7 Web2Py
1.1.8 The Need for a Pure Python Web Framework
1.1.9 Academic Significance
1.2 Firing It Up
1.2.1 Technical Requirements
1.2.2 Environment Installation with Anaconda
Programmatic Installation
Graphical Installation
1.2.3 Downloading and Installing Streamlit
Direct pip Installation
Manual Wheel File Installation
Importing Streamlit
1.2.4 Streamlit Console Commands
Configuring Streamlit Through the Console
1.2.5 Running Demo Apps
1.2.6 Writing and Testing Code with PyCharm
1.3 How Streamlit Works
1.3.1 The Streamlit Architecture
1.3.2 ReactJS in Streamlit
1.4 Summary
Chapter 2: Streamlit Basics
2.1 Creating a Basic Application
2.1.1 Generating User Input Forms
2.1.2 Introducing Conditional Flow
Example 1
Example 2
2.1.3 Managing and Debugging Errors
Example 1
Example 2
2.2 Mutating Dataframes
2.2.1 Filter
2.2.2 Select
2.2.3 Arrange
2.2.4 Mutate
2.2.5 Group By
2.2.6 Merge
2.3 Rendering Static and Interactive Charts
2.3.1 Static Bar Chart
2.3.2 Static Line Chart
2.3.3 Interactive Line Chart
2.3.4 Interactive Map
2.4 Developing the User Interface
2.5 Summary
Chapter 3: Architecting the User Interface
3.1 Designing the Application
3.1.1 Configuring the Page
Basic Page Configuration
Removing Footer and Hamburger Menu
Adding a Customized Footer
Advanced Page Configuration
3.1.2 Developing Themes and Color schemes
Customizing the Theme Graphically
Customizing the Theme Programmatically
Using Themes with Custom Components
3.1.3 Organizing the Page
Sidebar
Expanders
Columns
Containers
Placeholders
3.2 Displaying Dynamic Content
3.2.1 Creating a Real-Time Progress Bar
3.3 Provisioning Multipage Applications
3.3.1 Creating Pages
Enabling URL Paths
3.3.2 Creating Subpages
3.4 Modularizing Application Development
3.4.1 Example: Developing a Social Network Application
3.4.2 Best Practices for Folder Structuring
3.5 Summary
Chapter 4: Data Management and Visualization
4.1 Data Management
4.1.1 Processing Bytes Data
Text
Multimedia
Dataframes
4.1.2 Caching Big Data
4.1.3 Mutating Data in Real Time
Native Data Mutation
4.1.4 Advanced and Interactive Data Mutation
4.2 Exploring Plotly Data Visualizations
4.2.1 Rendering Plotly in Streamlit
4.2.2 Basic Charts
Line Chart
Scatter Chart
Bar Chart
Pie Chart
Chart Layout
4.2.3 Statistical Charts
Histogram
Box Plot
4.2.4 Time-Series Charts
4.2.5 Geospatial Charts
4.2.6 Animated Visualizations
Animated Bubble Map
Animated Bar Chart
4.3 Summary
Chapter 5: Database Integration
5.1 Relational Databases
5.1.1 Introduction to SQL
5.1.2 Connecting a PostgreSQL Database to Streamlit
5.1.3 Displaying Tables in Streamlit
5.2 Nonrelational Databases
5.2.1 Introduction to MongoDB
5.2.2 Provisioning a Cloud Database
5.2.3 Full-Text Indexing
5.2.4 Querying the Database
5.2.5 Displaying Tables in Streamlit
5.3 Summary
Chapter 6: Leveraging Backend Servers
6.1 The Need for Backend Servers
6.2 Frontend-Backend Communication
6.2.1 HTTP Methods
6.3 Working with JSON Files
6.4 Provisioning a Backend Server
6.4.1 API Building
6.4.2 API Testing
6.5 Multithreading and Multiprocessing Requests
6.6 Connecting Streamlit to a Backend Server
6.7 Summary
Chapter 7: Implementing Session State
7.1 Implementing Session State Natively
7.1.1 Building an Application with Session State
7.2 Introducing Session IDs
7.3 Implementing Session State Persistently
7.4 User Insights
7.4.1 Visualizing User Insights
7.5 Cookie Management
7.6 Summary
Chapter 8: Authentication and Application Security
8.1 Developing User Accounts
8.1.1 Hashing
8.1.2 Salting
8.2 Verifying User Credentials
8.3 Secrets Management
8.4 Anti-SQL Injection Measures with SQLAlchemy
8.5 Configuring Gitignore Variables
8.6 Summary
Chapter 9: Deploying Locally and to the Cloud
9.1 Exposing Streamlit to the World Wide Web
9.1.1 Port Forwarding over a Network Gateway
9.1.2 HTTP Tunneling Using NGROK
9.2 Deployment to Streamlit Cloud
9.2.1 One-Click Deployment
9.2.2 Streamlit Secrets
9.3 Deployment to Linux
9.3.1 Native Deployment on a Linux Machine
9.3.2 Deployment with Linux Docker Containers
9.4 Deployment to Windows Server
9.4.1 Establishing a Remote Desktop Connection
9.4.2 Opening TCP/IP Ports
9.4.3 Anaconda Offline Package Installation
9.4.4 Adding Anaconda to System Path
9.4.5 Running Application as an Executable Batch File
9.4.6 Running Application As a Persistent Windows Service
9.5 Summary
Chapter 10: Building Streamlit Components
10.1 Introduction to Streamlit Custom Components
10.2 Using ReactJS to Create Streamlit Custom Components
10.2.1 Making a ReactJS Component
10.2.2 Using a ReactJS Component in Streamlit
10.2.3 Sending Data to the Custom Component
10.2.4 Receiving Data from the Custom Component
10.3 Publishing Components As Pip Packages
10.4 Component in Focus: Extra-Streamlit-Components
10.4.1 Stepper Bar
10.4.2 Bouncing Image
10.4.3 Tab Bar
10.4.4 Cookie Manager
10.4.5 Router
10.5 Summary
Chapter 11: Streamlit Use Cases
11.1 Dashboards and Real-Time Applications
11.1.1 Temperature Data Recorder Application
11.1.2 Motor Command and Control Application
11.2 Time-Series Applications
11.2.1 Date-Time Filter Application
11.2.2 Time-Series Heatmap Application
11.2.3 Time Synchronization Application
11.3 Data Management and Machine Learning Applications
11.3.1 Data Warehouse Application
11.3.2 Advanced Application Development: Machine Learning As a Service
User Authentication Without a Backend Server
Utilities Script
Config Script
Main Script
Logistic Regression Classifier
11.4 Summary
Chapter 12: Streamlit at Work
12.1 Streamlit in Clean Energy: Iberdrola
12.1.1 Visualizing Operational Performance of Wind Farms
12.1.2 Wind Turbine Power Curves
12.1.3 Wind Roses
12.1.4 Heat Maps
12.1.5 Closing Remarks
12.2 Streamlit in Industry: maxon Group
12.2.1 Developing a Novel Surgical Scope Adapter System for Minimally Invasive Laparoscopy
12.2.2 Streamlit Command and Control Dashboard
12.2.3 Closing Remarks
12.3 Summary
Appendix A: Streamlit Application Program Interface
A.1 The Streamlit API
A.1.1 Displaying Text
Write
Text
Markdown
Title, Header, and Subheader
Caption
Code
LaTeX
Magic Commands
A.1.2 Displaying Data
Dataframes
Tables
JSON
Metric
A.1.3 Displaying Charts
Line, Area, and Bar Charts
Pyplot
Altair
Vega-Lite
Plotly
Bokeh
PyDeck
Graphviz
Maps
A.1.4 Input Widgets
Buttons
Download Button
Checkbox
Radio Button
Select Box
Multiselect Box
Slider
Select Slider
Text Input
Number Input
Text Area
Date Input
Time Input
File Uploader
Camera Input
Color Picker
Forms
A.1.5 Displaying Interactive Widgets
Displaying Images
Displaying an Audio Player
Displaying Video
A.1.6 Page Structure
Sidebar
Columns
Expander
Container
Placeholder
A.1.7 Displaying Status and Progress
Progress Bar
Spinner
Messages
Exception
Balloons
Snow
A.1.8 Utilities
Page Configuration
Code Echo
Documentation
Stop Execution
A.1.9 Session State Management
Initializing Session State Variables
Accessing Session State Variables
Updating Session State Variables
Deleting Session State Variables
Widget Session State
A.1.10 Data Management
Caching Data
Caching Functions
Caching Objects
Mutate Data
A.1.11 The Hamburger Menu
Bibliography
Index
📜 SIMILAR VOLUMES
<b>A practical guide for the rapid web application development with Flask</b><p></p><b>Key Features</b><li> Expert-led coverage of core capabilities of Flask, key extensions and its implementation. </li><li> Explore the Werkzeug toolkit and Jinja Template engine and see how Flask interacts with Java
Opa is a full-stack Open Source web development framework for JavaScript that lets you write secure and scalable web applications. It generates standard Node.js / MongoDB applications, natively supports HTML5 and CSS and automates many aspects of modern web application programming. It handles all as
<p>Discover the Django web application framework and get started building Python-based web applications. This book takes you from the basics of Django all the way through to cutting-edge topics such as creating RESTful applications. <i>Beginning Django</i> also covers ancillary, but essential, devel
<div><p>Discover the Django web application framework and get started building Python-based web applications. This book takes you from the basics of Django all the way through to cutting-edge topics such as creating RESTful applications. <em>Beginning Django</em> also covers ancillary, but essential
Discover the Django web application framework and get started building Python-based web applications. This book takes you from the basics of Django all the way through to cutting-edge topics such as creating RESTful applications.<i>Beginning Django</i>also covers ancillary, but essential, developmen