SlideShare uma empresa Scribd logo
1 de 22
My First Python Project 
Neetu Jain 
Software Engineer 
Softlayer, IBM 
nutshi@gmail.com, njain@softlayer.com
What’s Ahead? 
What to expect when diving into python: 
Bird’s eye view of “getting started into python” 
How to start your first python project: 
some kind of a skeleton , resources, pointers 
Help you realise that some comics hit close to home: 
Thanks to xkcd.com 
*** if you already know python, you might not get much out of this talk :)***
First Stop:Install 
Python Version: 
Python 2.x or Python 3.x 
Python IDE: 
Pycharm, pythonwin, sublime ...e.t.c 
version control: 
git, svn...e.t.c
Readability(whitespace) Matters!
Zen Of Python 
PEP8 
pip install --upgrade pep8 
pep8 --show-source --show-pep8 test.py 
4685 E501 line too long (80 > 79 characters) 
1718 E302 expected 2 blank lines, found 1 
pep8 --statistics -qq Project/ 
Pylint 
pip install pylint 
pylint --reports=n test.py 
C0111: 4,0:sth1: Missing docstring 
W0104: 5,4:sth1: Statement seems to have no effect
No More Compiler Breaks!
Nostalgia!
Bye Bye Static Typing
Built-in Data Structures 
● Sets 
● List 
● Tuple 
● Dictionary
No Pointers->No Segfaults 
*forget memory management and issues that arise from it*
Recycling Wins Reinventing 
Not likely in Python
Power of PyPi 
$pip install newpackage 
$import newpackage 
$newpackage.callitsfunction()
Testing Tools Ensure Automation 
**https://wiki.python.org/moin/PythonTestingToolsTaxonomy**
Tests:made easy 
$python unittest_simple.py 
$ python unittest_simple.py -v 
test (__main__.SimplisticTest) ... ok 
------------------------------------ 
Ran 1 test in 0.000s 
OK/FAIL/ERROR 
unittest_simple.py 
import unittest 
class FixturesTest(unittest.TestCase): 
def test(self): 
print 'in test()' 
self.failIf(True, 'failure message goes here') 
if __name__ == '__main__': 
unittest.main()
Python: you can do a lot! 
Process mgmt: supervisor 
Deployment mgmt :fabric Database: sqllite 
Web framework:flask Messaging: pika(amqp)
Virtual environment 
$ [sudo] pip install virtualenv 
$ cd ~/code/myproject/ 
$ virtualenv env 
New python executable in env/bin/python 
Installing setuptools............done. 
Installing pip...............done. 
$ ls env 
bin include lib 
$ which python 
/usr/bin/python 
$ source env/bin/activate 
$ which python 
/Users/name/code/myproject/env/bin/python
Directory structure some_root_dir/ 
|-- LICENSE 
|-- README 
|-- setup.py 
|-- example_project/ 
| |-- __init__.py 
| |-- useful_1.py 
| |-- drivers/ 
| | |--useful_2.py 
|-- tests/ 
| |-- __init__.py 
| |-- runall.py 
| |-- test0.py 
|-- docs/ 
| |--conf.py 
| |--generated
Setup.py 
from setuptools import setup, find_packages 
setup( 
name='buzz', 
version='0.1', 
description=Project name ', 
long_description=open('README.md', 'r').read(), 
classifiers=[ 
'Development Status :: 1 - Beta', 
'Programming Language :: Python :: 2.7', 
], 
author_email='innovation@softlayer.com', 
url='http://sldn.softlayer.com', 
license='MIT', 
packages=find_packages(), 
include_package_data=True, 
install_requires=[ 
‘package-name’, 
‘docutils>=0.3’, 
], 
entry_points={ 
'console_scripts': [ 
'face_of_project = module:your_function, 
] 
}, 
#just download not install 
setup_requires=[], 
)
vagrant VM manager 
$ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box 
$ mkdir my_vagrant_test 
$ cd my_vagrant_test 
$ vagrant init lucid32 
$ vim Vagrantfile 
$ vagrant up 
$ vagrant ssh 
$ vagrant status 
$ vagrant reload 
$ vagrant destroy
Supervisor: A Process Control System 
vagrant@buzz:~$ supervisord -c /vagrant/scripts/supervisord.conf 
vagrant@buzz:~$ sudo supervisorctl -c /vagrant/scripts/supervisord.conf 
apnsfb RUNNING pid 5671, uptime 0:02:17 
buzz RUNNING pid 5673, uptime 0:02:17 
flask RUNNING pid 5672, uptime 0:02:17 
vagrant@buzz:~$ cat /tmp/supervisord.log 
2014-09-12 18:31:22,001 CRIT Supervisor running as root (no user in config 
file) 
2014-09-12 18:31:22,017 INFO RPC interface 'supervisor' initialized
My First Python Project 
Neetu Jain 
Software Engineer 
Softlayer, IBM 
nutshi@gmail.com, njain@softlayer.com

Mais conteúdo relacionado

Mais procurados

Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabusSugantha T
 
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Edureka!
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
web programming Unit VIII complete about python by Bhavsingh Maloth
web programming Unit VIII complete about python  by Bhavsingh Malothweb programming Unit VIII complete about python  by Bhavsingh Maloth
web programming Unit VIII complete about python by Bhavsingh MalothBhavsingh Maloth
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Edureka!
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on pythonSANTOSHJAISWAL52
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Edureka!
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To PythonVanessa Rene
 
Python for the Mobile and Web
Python for the Mobile and WebPython for the Mobile and Web
Python for the Mobile and WebDerek Kiong
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonManishJha237
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingRanel Padon
 
Python tutorial
Python tutorialPython tutorial
Python tutorialGuru99
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 courseHimanshuPanwar38
 

Mais procurados (19)

Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Python course syllabus
Python course syllabusPython course syllabus
Python course syllabus
 
Python
Python Python
Python
 
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Introduction to python
 Introduction to python Introduction to python
Introduction to python
 
web programming Unit VIII complete about python by Bhavsingh Maloth
web programming Unit VIII complete about python  by Bhavsingh Malothweb programming Unit VIII complete about python  by Bhavsingh Maloth
web programming Unit VIII complete about python by Bhavsingh Maloth
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python for the Mobile and Web
Python for the Mobile and WebPython for the Mobile and Web
Python for the Mobile and Web
 
Python
PythonPython
Python
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI Programming
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Seminar report on python 3 course
Seminar report on python 3 courseSeminar report on python 3 course
Seminar report on python 3 course
 

Semelhante a First python project

Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Henry Schreiner
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingHenry Schreiner
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesLarry Cai
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Codemotion
 
Python packaging and dependency resolution
Python packaging and dependency resolutionPython packaging and dependency resolution
Python packaging and dependency resolutionTatiana Al-Chueyr
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry Schreiner
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvMarkus Zapke-Gründemann
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Yuriy Senko
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Patrick Muehlbauer
 
Software development practices in python
Software development practices in pythonSoftware development practices in python
Software development practices in pythonJimmy Lai
 
Startup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionStartup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionJuraj Michálek
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvMarkus Zapke-Gründemann
 
Intro to Pinax: Kickstarting Your Django Apps
Intro to Pinax: Kickstarting Your Django AppsIntro to Pinax: Kickstarting Your Django Apps
Intro to Pinax: Kickstarting Your Django AppsRoger Barnes
 
OpenStack for Centos
OpenStack for CentosOpenStack for Centos
OpenStack for CentosChandan Kumar
 
Writing a Python C extension
Writing a Python C extensionWriting a Python C extension
Writing a Python C extensionSqreen
 

Semelhante a First python project (20)

Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
 
Python virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutesPython virtualenv & pip in 90 minutes
Python virtualenv & pip in 90 minutes
 
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017
 
Python packaging and dependency resolution
Python packaging and dependency resolutionPython packaging and dependency resolution
Python packaging and dependency resolution
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)
 
Python on pi
Python on piPython on pi
Python on pi
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
Software development practices in python
Software development practices in pythonSoftware development practices in python
Software development practices in python
 
Startup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django sessionStartup Camp - Git, Python, Django session
Startup Camp - Git, Python, Django session
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 
Intro to Pinax: Kickstarting Your Django Apps
Intro to Pinax: Kickstarting Your Django AppsIntro to Pinax: Kickstarting Your Django Apps
Intro to Pinax: Kickstarting Your Django Apps
 
OpenStack for Centos
OpenStack for CentosOpenStack for Centos
OpenStack for Centos
 
Writing a Python C extension
Writing a Python C extensionWriting a Python C extension
Writing a Python C extension
 

Último

Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...gajnagarg
 
Complete Curriculum Vita for Paul Warshauer
Complete Curriculum Vita for Paul WarshauerComplete Curriculum Vita for Paul Warshauer
Complete Curriculum Vita for Paul WarshauerPaul Warshauer
 
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...nirzagarg
 
b-sc-agri-course-curriculum.pdf for Karnataka state board
b-sc-agri-course-curriculum.pdf for Karnataka state boardb-sc-agri-course-curriculum.pdf for Karnataka state board
b-sc-agri-course-curriculum.pdf for Karnataka state boardramyaul734
 
Miletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdfMiletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdfGabrielaMiletti
 
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...ZurliaSoop
 
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
B.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarB.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarDeepak15CivilEngg
 
Personal Brand Exploration - Fernando Negron
Personal Brand Exploration - Fernando NegronPersonal Brand Exploration - Fernando Negron
Personal Brand Exploration - Fernando Negronnegronf24
 
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...ZurliaSoop
 
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Juli Boned
 
Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.GabrielaMiletti
 
Guide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNGuide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNBruce Bennett
 
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...Angela Justice, PhD
 
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabadgargpaaro
 

Último (20)

Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Anantapur [ 7014168258 ] Call Me For Genuine Models...
 
Complete Curriculum Vita for Paul Warshauer
Complete Curriculum Vita for Paul WarshauerComplete Curriculum Vita for Paul Warshauer
Complete Curriculum Vita for Paul Warshauer
 
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Shivamogga [ 7014168258 ] Call Me For Genuine Model...
 
b-sc-agri-course-curriculum.pdf for Karnataka state board
b-sc-agri-course-curriculum.pdf for Karnataka state boardb-sc-agri-course-curriculum.pdf for Karnataka state board
b-sc-agri-course-curriculum.pdf for Karnataka state board
 
Miletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdfMiletti Gabriela_Vision Plan for artist Jahzel.pdf
Miletti Gabriela_Vision Plan for artist Jahzel.pdf
 
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Shillong [ 7014168258 ] Call Me For Genuine Models ...
 
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Jabalpur [ 7014168258 ] Call Me For Genuine Models ...
 
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
Jual obat aborsi Jakarta ( 085657271886 )Cytote pil telat bulan penggugur kan...
 
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Etawah [ 7014168258 ] Call Me For Genuine Models We...
 
B.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak KumarB.tech civil major project by Deepak Kumar
B.tech civil major project by Deepak Kumar
 
Girls in Aiims Metro (delhi) call me [🔝9953056974🔝] escort service 24X7
Girls in Aiims Metro (delhi) call me [🔝9953056974🔝] escort service 24X7Girls in Aiims Metro (delhi) call me [🔝9953056974🔝] escort service 24X7
Girls in Aiims Metro (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Personal Brand Exploration - Fernando Negron
Personal Brand Exploration - Fernando NegronPersonal Brand Exploration - Fernando Negron
Personal Brand Exploration - Fernando Negron
 
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...
Jual obat aborsi Dubai ( 085657271886 ) Cytote pil telat bulan penggugur kand...
 
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
Specialize in a MSc within Biomanufacturing, and work part-time as Process En...
 
Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.Brand Analysis for reggaeton artist Jahzel.
Brand Analysis for reggaeton artist Jahzel.
 
Guide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWNGuide to a Winning Interview May 2024 for MCWN
Guide to a Winning Interview May 2024 for MCWN
 
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Sagar [ 7014168258 ] Call Me For Genuine Models We ...
 
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In godhra [ 7014168258 ] Call Me For Genuine Models We...
 
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...
Simple, 3-Step Strategy to Improve Your Executive Presence (Even if You Don't...
 
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad
7737669865 Call Girls In Ahmedabad Escort Service Available 24×7 In In Ahmedabad
 

First python project

  • 1. My First Python Project Neetu Jain Software Engineer Softlayer, IBM nutshi@gmail.com, njain@softlayer.com
  • 2. What’s Ahead? What to expect when diving into python: Bird’s eye view of “getting started into python” How to start your first python project: some kind of a skeleton , resources, pointers Help you realise that some comics hit close to home: Thanks to xkcd.com *** if you already know python, you might not get much out of this talk :)***
  • 3. First Stop:Install Python Version: Python 2.x or Python 3.x Python IDE: Pycharm, pythonwin, sublime ...e.t.c version control: git, svn...e.t.c
  • 5. Zen Of Python PEP8 pip install --upgrade pep8 pep8 --show-source --show-pep8 test.py 4685 E501 line too long (80 > 79 characters) 1718 E302 expected 2 blank lines, found 1 pep8 --statistics -qq Project/ Pylint pip install pylint pylint --reports=n test.py C0111: 4,0:sth1: Missing docstring W0104: 5,4:sth1: Statement seems to have no effect
  • 8. Bye Bye Static Typing
  • 9. Built-in Data Structures ● Sets ● List ● Tuple ● Dictionary
  • 10. No Pointers->No Segfaults *forget memory management and issues that arise from it*
  • 11. Recycling Wins Reinventing Not likely in Python
  • 12. Power of PyPi $pip install newpackage $import newpackage $newpackage.callitsfunction()
  • 13. Testing Tools Ensure Automation **https://wiki.python.org/moin/PythonTestingToolsTaxonomy**
  • 14. Tests:made easy $python unittest_simple.py $ python unittest_simple.py -v test (__main__.SimplisticTest) ... ok ------------------------------------ Ran 1 test in 0.000s OK/FAIL/ERROR unittest_simple.py import unittest class FixturesTest(unittest.TestCase): def test(self): print 'in test()' self.failIf(True, 'failure message goes here') if __name__ == '__main__': unittest.main()
  • 15. Python: you can do a lot! Process mgmt: supervisor Deployment mgmt :fabric Database: sqllite Web framework:flask Messaging: pika(amqp)
  • 16.
  • 17. Virtual environment $ [sudo] pip install virtualenv $ cd ~/code/myproject/ $ virtualenv env New python executable in env/bin/python Installing setuptools............done. Installing pip...............done. $ ls env bin include lib $ which python /usr/bin/python $ source env/bin/activate $ which python /Users/name/code/myproject/env/bin/python
  • 18. Directory structure some_root_dir/ |-- LICENSE |-- README |-- setup.py |-- example_project/ | |-- __init__.py | |-- useful_1.py | |-- drivers/ | | |--useful_2.py |-- tests/ | |-- __init__.py | |-- runall.py | |-- test0.py |-- docs/ | |--conf.py | |--generated
  • 19. Setup.py from setuptools import setup, find_packages setup( name='buzz', version='0.1', description=Project name ', long_description=open('README.md', 'r').read(), classifiers=[ 'Development Status :: 1 - Beta', 'Programming Language :: Python :: 2.7', ], author_email='innovation@softlayer.com', url='http://sldn.softlayer.com', license='MIT', packages=find_packages(), include_package_data=True, install_requires=[ ‘package-name’, ‘docutils>=0.3’, ], entry_points={ 'console_scripts': [ 'face_of_project = module:your_function, ] }, #just download not install setup_requires=[], )
  • 20. vagrant VM manager $ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box $ mkdir my_vagrant_test $ cd my_vagrant_test $ vagrant init lucid32 $ vim Vagrantfile $ vagrant up $ vagrant ssh $ vagrant status $ vagrant reload $ vagrant destroy
  • 21. Supervisor: A Process Control System vagrant@buzz:~$ supervisord -c /vagrant/scripts/supervisord.conf vagrant@buzz:~$ sudo supervisorctl -c /vagrant/scripts/supervisord.conf apnsfb RUNNING pid 5671, uptime 0:02:17 buzz RUNNING pid 5673, uptime 0:02:17 flask RUNNING pid 5672, uptime 0:02:17 vagrant@buzz:~$ cat /tmp/supervisord.log 2014-09-12 18:31:22,001 CRIT Supervisor running as root (no user in config file) 2014-09-12 18:31:22,017 INFO RPC interface 'supervisor' initialized
  • 22. My First Python Project Neetu Jain Software Engineer Softlayer, IBM nutshi@gmail.com, njain@softlayer.com

Notas do Editor

  1. Vagrant, an open-source product released in 2010, is best described as a VM manager. It allows you to script and package the VM config and the provisioning setup. It is designed to run on top of almost any VM tool – VirtualBox, VMWare, AWS, etc.