www.glcnetworks.com
Dynamic website
with python
GLC webinar, 4 Feb 2021
Achmad Mardiansyah
achmad@glcnetworks.com
GLC Networks, Indonesia
1
www.glcnetworks.com
Agenda
● Introduction
● How website works
● Python language
● Python for dynamic website
● Live practice
● Q & A
2
www.glcnetworks.com
introduction
3
www.glcnetworks.com
What is GLC?
● Garda Lintas Cakrawala (www.glcnetworks.com)
● Based in Bandung, Indonesia
● Areas: Training, IT Consulting
● Certified partner for: Mikrotik, Ubiquity, Linux foundation
● Product: GLC radius manager
● Regular event
4
www.glcnetworks.com
Trainer Introduction
● Name: Achmad Mardiansyah
● Base: bandung, Indonesia
● Linux user since 1999, mikrotik user since 2007, UBNT
2011
● Mikrotik Certified Trainer
(MTCNA/RE/WE/UME/INE/TCE/IPv6)
● Mikrotik/Linux Certified Consultant
● Website contributor: achmadjournal.com, mikrotik.tips,
asysadmin.tips
● More info:
http://au.linkedin.com/in/achmadmardiansyah
5
www.glcnetworks.com
Past experiences
6
● 2021 (Congo DRC, Malaysia): network support,
radius/billing integration
● 2020 (Congo DRC, Malaysia): IOT integration,
network automation
● 2019, Congo (DRC): build a wireless ISP from
ground-up
● 2018, Malaysia: network revamp, develop billing
solution and integration, setup dynamic routing
● 2017, Libya (north africa): remote wireless migration
for a new Wireless ISP
● 2016, United Kingdom: workshop for wireless ISP,
migrating a bridged to routed network
www.glcnetworks.com
About GLC webinar?
● First webinar: january 1, 2010 (title:
tahun baru bersama solaris - new year
with solaris OS)
● As a sharing event with various topics:
linux, networking, wireless, database,
programming, etc
● Regular schedule
● Irregular schedule: as needed
● Checking schedule:
http://www.glcnetworks.com/schedule
● You are invited to be a presenter
○ No need to be an expert
○ This is a forum for sharing: knowledge,
experiences, information
7
www.glcnetworks.com
Please introduce yourself
● Your name
● Your company/university?
● Your networking experience?
● Your mikrotik experience?
● Your expectation from this course?
8
www.glcnetworks.com
How website works
9
www.glcnetworks.com
10
www.glcnetworks.com
Python language
11
www.glcnetworks.com
Python language
● Interpreted language (similar to PHP)
● Programming language (HTML is not
programming language)
● Easier to read
● Multi purpose language
○ Application
○ Webbased application
○ Data science
○ Machine Learning
○ Internet Of Things
● Big community
● Lots of library
We assume you already familiar with python
12
www.glcnetworks.com
Python for dynamic website
13
www.glcnetworks.com
mod_python
● An apache module
● Bundled into webserver
● Require more resources,
especially RAM
14
Source: nick.borko.org
www.glcnetworks.com
● Web Server Gateway Interface
● Standadise interface
● Supported by community
wsgi
15
www.glcnetworks.com
Now lets try...
16
<IfModule !wsgi_module>
LoadModule wsgi_module modules/mod_wsgi_python3.so
</IfModule>
WSGIScriptAlias /test_wsgi /var/www/html/test_wsgi.py
WSGIScriptAlias /test1 /var/www/html/test1.py
WSGIScriptAlias /test2 /var/www/html/test2.py
WSGIScriptAlias /test3 /var/www/html/test3.py
WSGIScriptAlias /test4 /var/www/html/test4.py
WSGIScriptAlias /test5 /var/www/html/test5.py
WSGIScriptAlias /test6 /var/www/html/test6.py
WSGIScriptAlias /test7 /var/www/html/test7.py
WSGIScriptAlias /test8 /var/www/html/test8.py
WSGIScriptAlias /test9 /var/www/html/test9.py
<Directory /var/www/html>
Order allow,deny
Allow from all
</Directory>
www.glcnetworks.com
LIVE practice
17
www.glcnetworks.com
preparation
● SSH client
● SSH parameters
○ SSH address
○ SSH port
○ SSH username
○ SSH password
18
www.glcnetworks.com
Q & A
19
www.glcnetworks.com
Interested? Just come to our training...
● Topics are arranged in systematic and logical way
● You will learn from experienced teacher
● Not only learn the materials, but also sharing experiences, best-practices, and
networking
20
www.glcnetworks.com
End of slides
● Thank you for your attention
● Please submit your feedback: http://bit.ly/glcfeedback
● Like our facebook page: https://www.facebook.com/glcnetworks
● Slide: http://www.slideshare.net/r41nbuw
● Recording (youtube): https://goo.gl/28ABHU
● Stay tune with our schedule
● Any questions?
21

Dynamic Website with Python

  • 1.
    www.glcnetworks.com Dynamic website with python GLCwebinar, 4 Feb 2021 Achmad Mardiansyah achmad@glcnetworks.com GLC Networks, Indonesia 1
  • 2.
    www.glcnetworks.com Agenda ● Introduction ● Howwebsite works ● Python language ● Python for dynamic website ● Live practice ● Q & A 2
  • 3.
  • 4.
    www.glcnetworks.com What is GLC? ●Garda Lintas Cakrawala (www.glcnetworks.com) ● Based in Bandung, Indonesia ● Areas: Training, IT Consulting ● Certified partner for: Mikrotik, Ubiquity, Linux foundation ● Product: GLC radius manager ● Regular event 4
  • 5.
    www.glcnetworks.com Trainer Introduction ● Name:Achmad Mardiansyah ● Base: bandung, Indonesia ● Linux user since 1999, mikrotik user since 2007, UBNT 2011 ● Mikrotik Certified Trainer (MTCNA/RE/WE/UME/INE/TCE/IPv6) ● Mikrotik/Linux Certified Consultant ● Website contributor: achmadjournal.com, mikrotik.tips, asysadmin.tips ● More info: http://au.linkedin.com/in/achmadmardiansyah 5
  • 6.
    www.glcnetworks.com Past experiences 6 ● 2021(Congo DRC, Malaysia): network support, radius/billing integration ● 2020 (Congo DRC, Malaysia): IOT integration, network automation ● 2019, Congo (DRC): build a wireless ISP from ground-up ● 2018, Malaysia: network revamp, develop billing solution and integration, setup dynamic routing ● 2017, Libya (north africa): remote wireless migration for a new Wireless ISP ● 2016, United Kingdom: workshop for wireless ISP, migrating a bridged to routed network
  • 7.
    www.glcnetworks.com About GLC webinar? ●First webinar: january 1, 2010 (title: tahun baru bersama solaris - new year with solaris OS) ● As a sharing event with various topics: linux, networking, wireless, database, programming, etc ● Regular schedule ● Irregular schedule: as needed ● Checking schedule: http://www.glcnetworks.com/schedule ● You are invited to be a presenter ○ No need to be an expert ○ This is a forum for sharing: knowledge, experiences, information 7
  • 8.
    www.glcnetworks.com Please introduce yourself ●Your name ● Your company/university? ● Your networking experience? ● Your mikrotik experience? ● Your expectation from this course? 8
  • 9.
  • 10.
  • 11.
  • 12.
    www.glcnetworks.com Python language ● Interpretedlanguage (similar to PHP) ● Programming language (HTML is not programming language) ● Easier to read ● Multi purpose language ○ Application ○ Webbased application ○ Data science ○ Machine Learning ○ Internet Of Things ● Big community ● Lots of library We assume you already familiar with python 12
  • 13.
  • 14.
    www.glcnetworks.com mod_python ● An apachemodule ● Bundled into webserver ● Require more resources, especially RAM 14 Source: nick.borko.org
  • 15.
    www.glcnetworks.com ● Web ServerGateway Interface ● Standadise interface ● Supported by community wsgi 15
  • 16.
    www.glcnetworks.com Now lets try... 16 <IfModule!wsgi_module> LoadModule wsgi_module modules/mod_wsgi_python3.so </IfModule> WSGIScriptAlias /test_wsgi /var/www/html/test_wsgi.py WSGIScriptAlias /test1 /var/www/html/test1.py WSGIScriptAlias /test2 /var/www/html/test2.py WSGIScriptAlias /test3 /var/www/html/test3.py WSGIScriptAlias /test4 /var/www/html/test4.py WSGIScriptAlias /test5 /var/www/html/test5.py WSGIScriptAlias /test6 /var/www/html/test6.py WSGIScriptAlias /test7 /var/www/html/test7.py WSGIScriptAlias /test8 /var/www/html/test8.py WSGIScriptAlias /test9 /var/www/html/test9.py <Directory /var/www/html> Order allow,deny Allow from all </Directory>
  • 17.
  • 18.
    www.glcnetworks.com preparation ● SSH client ●SSH parameters ○ SSH address ○ SSH port ○ SSH username ○ SSH password 18
  • 19.
  • 20.
    www.glcnetworks.com Interested? Just cometo our training... ● Topics are arranged in systematic and logical way ● You will learn from experienced teacher ● Not only learn the materials, but also sharing experiences, best-practices, and networking 20
  • 21.
    www.glcnetworks.com End of slides ●Thank you for your attention ● Please submit your feedback: http://bit.ly/glcfeedback ● Like our facebook page: https://www.facebook.com/glcnetworks ● Slide: http://www.slideshare.net/r41nbuw ● Recording (youtube): https://goo.gl/28ABHU ● Stay tune with our schedule ● Any questions? 21