SlideShare a Scribd company logo
1 of 30
Download to read offline
From Java to Python
python.be meetup #5
by Ivo Houbrechts
Hi, I'm Ivo
FreelanceSoftwareCraftsman
ProfessionalDeveloperSince1997
UpcycledCode
Agenda
Whatwedevelop
Loveatfirstsight
Therockyroad
PyprojectX:thedealmaker
What we develop
Applications/RESTAPIs
~70gitrepositoriescheckedout
Java(Groovy),NodeJs,Python(Combined)
oldestrepo:2012
15+Pythonprojects
Love at first sight
Python 💕
NoCeremonialCode
Indentationbased
Comprehensions
Decorators
Batteriesincluded
Standardlibrarypackedwithusefulstuff
Pip/PyPI
Plentyoflearningresources
Python for AWS Lambda
IncomparisonwithJavaandJavaScript:
Betterlibrarysupport
Boto3
LambdaPowertools
Contractfirstdevelopment
OpenAPI/Swagger
Connexion+Flask+ServerlessWSGI
A unique chance to
compare
Distributedtracingimplementation
ImplementedinJava,JavaScriptandPython
Samefunctionality
SlightlymorefeaturesinPython
The verdict from SonarQube
Python JavaScript Java
LoC 223 249 754
Cyclomatic
Complexity 42 48 92
CognitiveComplexity 27 30 37
The rocky road
The preparation
Search Libraries
AWSspecific
Boto3
LambdaPowertools
PynamoDB
General
Connexion
Flask
ServerlessWSGI
Migrate custom AWS library
SmallJavaScriptlibrary
Helpersforeventhandling
APIGateway
S3
SQS
Utilityfunctions
Team Onboarding
Python Installation
AnticipatesupportofmultiplePythonversions
3differentJavaversions
2differentNodeJsversions
pyenv
theWindowsguyjustsurvived
frustrationsonMaccausedbydifferent
installationoptions
Onetimeeffort🙄
Auto-selectpythonwith.python-version😃
Dependency Management
Poetry
Worksasadvertised
Butnotforeveryone😵‍💫
Dependingontheinstallationmethod,yougotadifferent
version🤨
Tool dependency hell
BesidesPoetry,weuseblack,isort,pre-commit,...
10projectsx5toolsx3versions=upto150
combinations😱
ShowStopper!🛑
How do others solve this?
installtoolsasdevdependencies
impactonruntimedependencies
downgradeofdependenciesatbest
versionconflictsatworst
f.e.AWSSAMnotcompatiblewithboto3
docker
notdeveloperfriendly
doesnotplaywellwithIDEs
PyprojectX: the deal maker
What we learned from
Gradle
OnlydependsontheJavaruntime
Don'trelyonlocallyinstalledtools;tools
changeovertime!
Useawrapperscript
Downloadthecorrectversionifnotpresent
Don'tpolluteyourlocalenvironment
Storemostintheprojectdirectory
PyprojectX
Wrapperscripts
pwfor*nixandpw.batforWindows
Configurationinpyproject.toml
(Versioned)Tools
Frequentlyusedcommands
PyprojectX example
[tool.pyprojectx]
pdm = { requirements = ["pdm==2.9.3"],
post-install = "pw@setup-pre-commit" }
ruff = "ruff==0.0.287"
pre-commit = "pre-commit==3.4.0"
jupyter = ["jupyterlab", "-e ."]
[tool.pyprojectx.aliases]
install = "pdm install"
run = "pdm run"
test = "run pytest tests/unit"
start = "run python -m tests.local_flask"
outdated = "pdm update --outdated"
PyprojectX Demo
$ ./pw --info
$ ./pw install
$ ./pw i
$ ./pw start
$ cd tests/unit
$ ../../pw run pytest
$ ./pw pdm add requests
$ px run pytest
But still...
'pip install pdm==2.5.3' !=
'pip install pdm==2.5.3'
Releasesofdownstreamdependenciescanbreaka
Pythontool🤯
...anddockerwon't(always)solvethisforyou😭
SeePDMissue1883
PyprojectX v2
locktoolversions
simplifiedconfiguration
bugfixesandfeaturerequests
expectedrelease:january2024
Conclusions
Pythonisagreatlanguage
Dependencymanagementneedsextraattention
PyprojectXhelpsalothere
MigratingfromJavaorNodeJsisworthwhile
AtleastforAWSLambda
Questions?

More Related Content

Similar to The story of migrating from Java to Python

Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net DeveloperSarah Dutkiewicz
 
Pythonic doesn't mean slow!
Pythonic doesn't mean slow!Pythonic doesn't mean slow!
Pythonic doesn't mean slow!Ronan Lamy
 
Py Con 2009 Pumping Iron Into Python
Py Con 2009   Pumping Iron Into PythonPy Con 2009   Pumping Iron Into Python
Py Con 2009 Pumping Iron Into PythonSarah Dutkiewicz
 
Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataGael Varoquaux
 
Evdokimov python arsenal for re
Evdokimov   python arsenal for reEvdokimov   python arsenal for re
Evdokimov python arsenal for reDefconRussia
 
Java vs Python: Comparison, Features & Applications
Java vs Python: Comparison, Features & ApplicationsJava vs Python: Comparison, Features & Applications
Java vs Python: Comparison, Features & ApplicationsWeblineIndia
 
Picking programming packages
Picking programming packagesPicking programming packages
Picking programming packagesAbe Gong
 
Which is better, Java or Python? And how?
Which is better, Java or Python? And how?Which is better, Java or Python? And how?
Which is better, Java or Python? And how?narendrachinnu
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PuneEthan's Tech
 
Introduction to the Python conda package manager
Introduction to the Python conda package managerIntroduction to the Python conda package manager
Introduction to the Python conda package managerDamien Garaud
 
Python Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docxPython Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docxManohar k
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONRuchiNagar3
 
python course in pune.pdf
python course in pune.pdfpython course in pune.pdf
python course in pune.pdfitview
 
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdfThe Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdfssuser8b3cdd
 

Similar to The story of migrating from Java to Python (20)

Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net Developer
 
Pythonic doesn't mean slow!
Pythonic doesn't mean slow!Pythonic doesn't mean slow!
Pythonic doesn't mean slow!
 
Py Con 2009 Pumping Iron Into Python
Py Con 2009   Pumping Iron Into PythonPy Con 2009   Pumping Iron Into Python
Py Con 2009 Pumping Iron Into Python
 
Scientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of dataScientist meets web dev: how Python became the language of data
Scientist meets web dev: how Python became the language of data
 
Evdokimov python arsenal for re
Evdokimov   python arsenal for reEvdokimov   python arsenal for re
Evdokimov python arsenal for re
 
Ruby - The Hard Bits
Ruby - The Hard BitsRuby - The Hard Bits
Ruby - The Hard Bits
 
Java vs Python: Comparison, Features & Applications
Java vs Python: Comparison, Features & ApplicationsJava vs Python: Comparison, Features & Applications
Java vs Python: Comparison, Features & Applications
 
Pyconza(2)
Pyconza(2)Pyconza(2)
Pyconza(2)
 
Picking programming packages
Picking programming packagesPicking programming packages
Picking programming packages
 
Which is better, Java or Python? And how?
Which is better, Java or Python? And how?Which is better, Java or Python? And how?
Which is better, Java or Python? And how?
 
Cmpe202 01 Research
Cmpe202 01 ResearchCmpe202 01 Research
Cmpe202 01 Research
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech Pune
 
Introduction to the Python conda package manager
Introduction to the Python conda package managerIntroduction to the Python conda package manager
Introduction to the Python conda package manager
 
Python Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docxPython Programming and ApplicationsUnit-1.docx
Python Programming and ApplicationsUnit-1.docx
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
 
python course in pune.pdf
python course in pune.pdfpython course in pune.pdf
python course in pune.pdf
 
Django
DjangoDjango
Django
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
Web Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptxWeb Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptx
 
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdfThe Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
The Python Book_ The ultimate guide to coding with Python ( PDFDrive ).pdf
 

Recently uploaded

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

The story of migrating from Java to Python