SlideShare a Scribd company logo
1 of 16
Do .egg à Web
Usando o microframework Flask
por Arthur Bressan
11 e 12 de Novembro de 2015
arthurbressan2@hotmail.com
Shell do Python
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Contas matemáticas
>>> 1 + 2
3
>>> 3 * 3
9
>>> 2 ** 10
1024
>>> 2 / 2
1
>>> 10 / 3
3
>>> 10.0 / 3
3.3333333333333335
>>> 10 // 3
3
>>> 10.0 // 3
3.0
>>> 4 + 5 * 10
54
Variáveis
>>> altura = 10
>>> largura = 20
>>> profundidade = 5
>>> volume = altura * largura * profundidade
>>> altura
10
>>> largura
20
>>> profundidade
5
>>> volume
1000
Strings
>>> Hello
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'Hello' is not defined
>>> "Hello"
'Hello'
>>> "World"
'World'
>>> u"Olá mundo!"
'Olxc3xa1 mundo!'
>>> print u'Olá mundo'
Olá mundo!
Índices
>>> s = "Hello World"
>>> s[0]
'H'
>>> s[-1]
'd'
>>> s[:5]
'Hello'
>>> s[6:]
'World'
>>> s[6:9]
'Wor'
Listas
>>> l = []
>>> l
[]
>>> l = [1, 2, 'abc']
>>> l
[1, 2, 'abc']
>>> l[0]
1
>>> l[2]
'abc'
>>> l[1:2]
[2]
>>> l = []
>>> l.append(1)
>>> l
[1]
>>> l.append(2)
>>> l
[1, 2]
>>> l.append([1,2])
>>> l
[1, 2, [1, 2]]
>>> l.extend([1, 2])
[1, 2, [1, 2], 1, 2]
>>> len(l)
5
>>> l = [1, 2, 3]
>>> 1 in l
True
>>> 5 in l
False
if/elif/else
>>> l = [1, 2, 3]
>>> if 1 in l:
... print 'a'
... elif 2 not in l:
... print 'b'
... else:
... print 'c'
...
'a'
for
>>> l = [1, 2, 3]
>>> for n in l:
... print n
...
1
2
3
>>> s = 'Hello world'
>>> for c in s:
... print c
...
Funções
>>> def func(x):
... print "Hello", x
...
>>> func(1)
Hello 1
>>> def gunc(x):
... return x + 1
...
>>> gunc(0)
1
>>> x = gunc(1)
>>> x
2
Executando arquivos .py
$ echo "print 'Hello World'" > arquivo.py
$ python arquivo.py
Hello World
Dúvidas?
Obrigado pela atenção e happy coding!!
arthurpbressan@gmail.com
https://github.com/ArthurPBressan
https://github.com/ArthurPBressan/egg-a-web
Bônus
https://exploreflask.com/

More Related Content

What's hot

Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackCosimo Streppone
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22Yuya Takei
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent osManusia Tenan
 
Border Patrol - Count, throttle, kick & ban in perl
Border Patrol - Count, throttle, kick & ban in perlBorder Patrol - Count, throttle, kick & ban in perl
Border Patrol - Count, throttle, kick & ban in perlDavid Morel
 
Fizzbuzz in Complex Plane
Fizzbuzz in Complex PlaneFizzbuzz in Complex Plane
Fizzbuzz in Complex PlaneKaoru Maeda
 
How to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMONaoto MATSUMOTO
 
Bash script (mask off remix)
Bash script (mask off remix)Bash script (mask off remix)
Bash script (mask off remix)Elaine Yeung
 
Pop3stat sh
Pop3stat shPop3stat sh
Pop3stat shBen Pope
 
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...OWASP Russia
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito
 
It assist servicii it powered by linux
It assist   servicii it powered by linuxIt assist   servicii it powered by linux
It assist servicii it powered by linuxitchannel
 
Implementing JMS Integration Solutions with WSO2 ESB
Implementing JMS Integration Solutions with WSO2 ESBImplementing JMS Integration Solutions with WSO2 ESB
Implementing JMS Integration Solutions with WSO2 ESBWSO2
 
SSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoSSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoTiago Cruz
 

What's hot (20)

Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attack
 
RG講義_SSH
RG講義_SSHRG講義_SSH
RG講義_SSH
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
Thin
ThinThin
Thin
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent os
 
Border Patrol - Count, throttle, kick & ban in perl
Border Patrol - Count, throttle, kick & ban in perlBorder Patrol - Count, throttle, kick & ban in perl
Border Patrol - Count, throttle, kick & ban in perl
 
Fizzbuzz in Complex Plane
Fizzbuzz in Complex PlaneFizzbuzz in Complex Plane
Fizzbuzz in Complex Plane
 
Wrapper to use Japanse font with vcd::mosaic and build it as pakcage
Wrapper to use Japanse font with vcd::mosaic and build it as pakcageWrapper to use Japanse font with vcd::mosaic and build it as pakcage
Wrapper to use Japanse font with vcd::mosaic and build it as pakcage
 
Kumpulan script jahil
Kumpulan script jahilKumpulan script jahil
Kumpulan script jahil
 
Peno3server
Peno3serverPeno3server
Peno3server
 
Token based-oauth2
Token based-oauth2Token based-oauth2
Token based-oauth2
 
How to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMOHow to Install Ghost (CMS) MEMO
How to Install Ghost (CMS) MEMO
 
Bash script (mask off remix)
Bash script (mask off remix)Bash script (mask off remix)
Bash script (mask off remix)
 
Pop3stat sh
Pop3stat shPop3stat sh
Pop3stat sh
 
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
[1.2] Трюки при анализе защищенности веб приложений – продвинутая версия - С...
 
Install debian 5 lenny
Install debian 5 lennyInstall debian 5 lenny
Install debian 5 lenny
 
Neoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devsNeoito — *NIX kungfu for web devs
Neoito — *NIX kungfu for web devs
 
It assist servicii it powered by linux
It assist   servicii it powered by linuxIt assist   servicii it powered by linux
It assist servicii it powered by linux
 
Implementing JMS Integration Solutions with WSO2 ESB
Implementing JMS Integration Solutions with WSO2 ESBImplementing JMS Integration Solutions with WSO2 ESB
Implementing JMS Integration Solutions with WSO2 ESB
 
SSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoSSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso Remoto
 

Viewers also liked

Certificate_Innovation and IT Magt
Certificate_Innovation and IT MagtCertificate_Innovation and IT Magt
Certificate_Innovation and IT MagtPrakash Prasad ✔
 
Graficos diario del eurodolar para el 23 11 2012
Graficos diario del eurodolar para el 23 11 2012Graficos diario del eurodolar para el 23 11 2012
Graficos diario del eurodolar para el 23 11 2012Experiencia Trading
 
Upload 2 of 4 introduction to simulators
Upload 2 of 4 introduction to simulators Upload 2 of 4 introduction to simulators
Upload 2 of 4 introduction to simulators Jerome Castaños
 
La donna più bella del Rinascimento: Simonetta Vespucci.
La donna più bella del Rinascimento: Simonetta Vespucci.La donna più bella del Rinascimento: Simonetta Vespucci.
La donna più bella del Rinascimento: Simonetta Vespucci.Rita Lo Iacono
 
Amministrazione, Finanza e Marketing Indirizzo sportivo
Amministrazione, Finanza e Marketing Indirizzo sportivo   Amministrazione, Finanza e Marketing Indirizzo sportivo
Amministrazione, Finanza e Marketing Indirizzo sportivo Rita Lo Iacono
 
Sistema nervioso
Sistema nerviosoSistema nervioso
Sistema nerviosoterezaZZ
 
[Open data] rassegna della letteratura
[Open data] rassegna della letteratura[Open data] rassegna della letteratura
[Open data] rassegna della letteraturaUSAC Program
 

Viewers also liked (14)

Certificate_Innovation and IT Magt
Certificate_Innovation and IT MagtCertificate_Innovation and IT Magt
Certificate_Innovation and IT Magt
 
Graficos diario del eurodolar para el 23 11 2012
Graficos diario del eurodolar para el 23 11 2012Graficos diario del eurodolar para el 23 11 2012
Graficos diario del eurodolar para el 23 11 2012
 
Cert2
Cert2Cert2
Cert2
 
Nombre
NombreNombre
Nombre
 
Upload 2 of 4 introduction to simulators
Upload 2 of 4 introduction to simulators Upload 2 of 4 introduction to simulators
Upload 2 of 4 introduction to simulators
 
Il Ritratto
Il RitrattoIl Ritratto
Il Ritratto
 
Producto en oferta (i)
Producto en oferta (i)Producto en oferta (i)
Producto en oferta (i)
 
Resume 10 6 2015
Resume 10 6 2015Resume 10 6 2015
Resume 10 6 2015
 
bijender (1)
bijender (1)bijender (1)
bijender (1)
 
La donna più bella del Rinascimento: Simonetta Vespucci.
La donna più bella del Rinascimento: Simonetta Vespucci.La donna più bella del Rinascimento: Simonetta Vespucci.
La donna più bella del Rinascimento: Simonetta Vespucci.
 
Amministrazione, Finanza e Marketing Indirizzo sportivo
Amministrazione, Finanza e Marketing Indirizzo sportivo   Amministrazione, Finanza e Marketing Indirizzo sportivo
Amministrazione, Finanza e Marketing Indirizzo sportivo
 
Femina - Feature
Femina - FeatureFemina - Feature
Femina - Feature
 
Sistema nervioso
Sistema nerviosoSistema nervioso
Sistema nervioso
 
[Open data] rassegna della letteratura
[Open data] rassegna della letteratura[Open data] rassegna della letteratura
[Open data] rassegna della letteratura
 

Similar to Do .egg à web

جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲Mohammad Reza Kamalifard
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppetlutter
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultOlinData
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to PythonKHNOG
 
Python Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuidePython Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuideMihai Catalin Teodosiu
 
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE
 
Asciidoctor New, Noteworthy and Beyond Devoxx-2017
Asciidoctor New, Noteworthy and Beyond Devoxx-2017Asciidoctor New, Noteworthy and Beyond Devoxx-2017
Asciidoctor New, Noteworthy and Beyond Devoxx-2017Alex Soto
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloudNUTC, imac
 
Reutov, yunusov, nagibin random numbers take ii
Reutov, yunusov, nagibin   random numbers take iiReutov, yunusov, nagibin   random numbers take ii
Reutov, yunusov, nagibin random numbers take iiDefconRussia
 
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPKonfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPWalid Umar
 
ClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
ClickHouse Defense Against the Dark Arts - Intro to Security and PrivacyClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
ClickHouse Defense Against the Dark Arts - Intro to Security and PrivacyAltinity Ltd
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 
How to Avoid Common Mistakes When Using Reactor Netty
How to Avoid Common Mistakes When Using Reactor NettyHow to Avoid Common Mistakes When Using Reactor Netty
How to Avoid Common Mistakes When Using Reactor NettyVMware Tanzu
 

Similar to Do .egg à web (20)

Floating point
Floating pointFloating point
Floating point
 
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه اول پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
 
Starting python
Starting pythonStarting python
Starting python
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vault
 
uerj201212
uerj201212uerj201212
uerj201212
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python Network Programming – Course Applications Guide
Python Network Programming – Course Applications GuidePython Network Programming – Course Applications Guide
Python Network Programming – Course Applications Guide
 
Mininet Basics
Mininet BasicsMininet Basics
Mininet Basics
 
FIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT DevicesFIWARE Wednesday Webinars - How to Secure IoT Devices
FIWARE Wednesday Webinars - How to Secure IoT Devices
 
Asciidoctor New, Noteworthy and Beyond Devoxx-2017
Asciidoctor New, Noteworthy and Beyond Devoxx-2017Asciidoctor New, Noteworthy and Beyond Devoxx-2017
Asciidoctor New, Noteworthy and Beyond Devoxx-2017
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
Reutov, yunusov, nagibin random numbers take ii
Reutov, yunusov, nagibin   random numbers take iiReutov, yunusov, nagibin   random numbers take ii
Reutov, yunusov, nagibin random numbers take ii
 
Random numbers
Random numbersRandom numbers
Random numbers
 
Python lec1
Python lec1Python lec1
Python lec1
 
Setting ubuntu server sebagai pc router
Setting ubuntu server sebagai pc routerSetting ubuntu server sebagai pc router
Setting ubuntu server sebagai pc router
 
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCPKonfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
Konfigurasi Server Gateway dengan fitur PROXY, WEBSERVER dan DHCP
 
ClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
ClickHouse Defense Against the Dark Arts - Intro to Security and PrivacyClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
ClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 
How to Avoid Common Mistakes When Using Reactor Netty
How to Avoid Common Mistakes When Using Reactor NettyHow to Avoid Common Mistakes When Using Reactor Netty
How to Avoid Common Mistakes When Using Reactor Netty
 

Recently uploaded

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Do .egg à web

  • 1. Do .egg à Web Usando o microframework Flask por Arthur Bressan 11 e 12 de Novembro de 2015 arthurbressan2@hotmail.com
  • 2.
  • 3. Shell do Python $ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
  • 4. Contas matemáticas >>> 1 + 2 3 >>> 3 * 3 9 >>> 2 ** 10 1024 >>> 2 / 2 1 >>> 10 / 3 3 >>> 10.0 / 3 3.3333333333333335 >>> 10 // 3 3 >>> 10.0 // 3 3.0 >>> 4 + 5 * 10 54
  • 5. Variáveis >>> altura = 10 >>> largura = 20 >>> profundidade = 5 >>> volume = altura * largura * profundidade >>> altura 10 >>> largura 20 >>> profundidade 5 >>> volume 1000
  • 6. Strings >>> Hello Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'Hello' is not defined >>> "Hello" 'Hello' >>> "World" 'World' >>> u"Olá mundo!" 'Olxc3xa1 mundo!' >>> print u'Olá mundo' Olá mundo!
  • 7. Índices >>> s = "Hello World" >>> s[0] 'H' >>> s[-1] 'd' >>> s[:5] 'Hello' >>> s[6:] 'World' >>> s[6:9] 'Wor'
  • 8. Listas >>> l = [] >>> l [] >>> l = [1, 2, 'abc'] >>> l [1, 2, 'abc'] >>> l[0] 1 >>> l[2] 'abc' >>> l[1:2] [2] >>> l = [] >>> l.append(1) >>> l [1] >>> l.append(2) >>> l [1, 2] >>> l.append([1,2]) >>> l [1, 2, [1, 2]] >>> l.extend([1, 2]) [1, 2, [1, 2], 1, 2] >>> len(l) 5 >>> l = [1, 2, 3] >>> 1 in l True >>> 5 in l False
  • 9. if/elif/else >>> l = [1, 2, 3] >>> if 1 in l: ... print 'a' ... elif 2 not in l: ... print 'b' ... else: ... print 'c' ... 'a'
  • 10. for >>> l = [1, 2, 3] >>> for n in l: ... print n ... 1 2 3 >>> s = 'Hello world' >>> for c in s: ... print c ...
  • 11. Funções >>> def func(x): ... print "Hello", x ... >>> func(1) Hello 1 >>> def gunc(x): ... return x + 1 ... >>> gunc(0) 1 >>> x = gunc(1) >>> x 2
  • 12. Executando arquivos .py $ echo "print 'Hello World'" > arquivo.py $ python arquivo.py Hello World
  • 13.
  • 15. Obrigado pela atenção e happy coding!! arthurpbressan@gmail.com https://github.com/ArthurPBressan https://github.com/ArthurPBressan/egg-a-web