SlideShare una empresa de Scribd logo
1 de 42
RobertoStefanetti, MVPBusinessApplications
MicrosoftEducationInfluencer
https://robertostefanettinavblog.com
WHAT IS PYTHON ?
PYTHON ?
https://www.python.org
Python is an open source
programming language that
was made to be easy-to-read
and powerful. A Dutch
programmer named Guido van
Rossum made Python in 1991.
He named it after the television
show Monty Python's Flying
Circus
Python Diffusion
PYTHON IS USED IN..
Python is used in... a lot of institutions!
NASA, Facebook, Google, Mozilla, Yahoo, Dropbox, IBM,
Youtube, iRobot, Maya, Paint apps etc. etc.
… these “Giants” use Python in their “CORE products” and
services!
DOWNLOAD PYTHON
Python can be run on Apache (Linux) and IIS (Windows) and
in Visual Studio Code (as Python Extension)
Python for Windows Download from
https://www.python.org/downloads/windows/
PYTHON for Visual Studio Code
Python can be run also in Visual Studio Code (as Python
Extension).. Nice for Business Central Developers…
About Python
Python is:
• Programming language
• Scripting language
• Interpreted language (called AS IS)
• Open Source (by Design)
• Born between 1980-1990
Python is for
Python is for:
“A lot of implementations”
• Desktop App, Mobile App, Web App
• AI & ML
• Data Science
• IoT (Internet of Things)
• Interfaces….
..and many other things
Python can manage
Python can manage:
• UI
• Databases
• Calculations
• Graphics
• Scripting & Programming
• Authentications & protocols
Phyton Technology
Python Technology
• Object oriented language (polymorph, inheritance,
overriding etc.)
• Interpreted (copy and run fast!…)
• Clear and simple code
• Language is expandable with other sub languages (ex:
Flask module)
• Extensible (libraries) #import…. modules
Python Editor
Python Editor SHELL
Source Code “.py” and “.pyc”
Python Source Code
• Extension code is “.py”  Python Code
• Translated to byte code (complied to “.pyc”)  Compiled Python
• On Virtual Machine  Written and compiled  but interpreted
Syntax
Syntax
Python Identifier: a name used to identify a variable, function, class, module or other
objects.
An Identifier start with a letter A..Z or a..z or an _ (underscore)
NO punctuation chars : @, $, % etc., is CASE SENSITIVE
NO Braches for blocks (only indentation)
# is a comment
Python use ‘, ‘’, ‘’’ quote to define strings
if Condition:
Statement = ‘test’
else:
OtherStatement = ‘test2’
Data Types
Data Types
Major Python data types:
String - ‘’ & “”
List - [1,2,’aa’,True]
Tuple - (34, 3.4, ‘aa’, True)  immutable
Set/frozenset - set(1,2, ‘aa’,True)
Hash Dictionary - {‘k1’:1, ‘k2’:False}  Groups of Keys and values
Strings
Strings
String: a contiguous set of chars in quotation marks.
Subset string: taken using slice operator ([], [:])
+ = concatenation operator
* = repetition operator
Lists
Lists
Lists: separate by commas and enclosed in brackets [] (like C,C# arrays)
Data Values: you can access to lists data values using with slice operators
+ = concatenation operator
* = repetition operator
Operators
Python Operators (various)
- Arithmetic
- Relational
- Conditional
- Logical
- Bitwise
- Assignment
- Special
Operators
Comparison operators
Conditionals
Conditionals Statements
If statement (boolean expression)
If else statement (with optional else)
Nested if statements (if nested in other if..)
Loops
Types of loops
While loop
For loop
Functions
Functions
A function is an organized and “reusable” block of code.
Many Built-in Functions are already available (ex: print)
You can create your “user functions”
A Function block start with def followed by name and ()
def my_function(fname):
print(fname + " Refsnes")
my_function("Emil")
my_function("Tobias")
my_function("Linus")
def my_function():
print("Hello from a function")
my_function()
Functions
Functions - return value & recursion
def tri_recursion(k):
if(k>0):
result = k+tri_recursion(k-1)
print(result)
else:
result = 0
return result
print("nnRecursion Example Results")
tri_recursion(6)
def my_function(x):
return 5 * x
print(my_function(3))
print(my_function(5))
print(my_function(9))
Function with Description
Function with Descriptions
cmp(listA, listB)  compare elements
len(list)  total length
max(list)  max & Min
min(list)
list(seq)  convert a tuple into a list
Modules
Python Module?  file containing python statements (DLL
like)
• “Divide and impera”  with modules
• Module is a object with a lot of functions (like a function
server or function package)
• You can “Import Modules”
Inheritance
Inheritance ?
> Sure, you can create a parent class and a child class
class Person:
def __init__(self, fname, lname):
self.firstname = fname
self.lastname = lname
def printname(self):
print(self.firstname, self.lastname)
#Use the Person class to create an object, and
then execute the printname method:
x = Person("John", "Doe")
x.printname()
class Student(Person):
pass
x = Student("Mike", "Olsen")
x.printname()
Try-Except
Try-Except
• The try block lets you test a block of code for errors
• The except block lets you handle the error
• The finally block lets you execute code, regardless of the result of the try-
and except blocks
try:
print(x)
except:
print("An exception occurred")
Json (Convert from JSON to Python & Vice-versa)
Json
import json
# some JSON:
x = '{ "name":"John", "age":30, "city":"New
York"}'
# parse x:
y = json.loads(x)
# the result is a Python dictionary:
print(y["age"])
Convert from JSON to Python:
Convert from Python to JSON:
import json
# a Python object (dict):
x = {
"name": "John",
"age": 30,
"city": "New York"
}
# convert into JSON:
y = json.dumps(x)
# the result is a JSON string:
print(y)
Install “.pip” modules (Python installer packages)
Install “.pip” modules (Python Modules: “DLL” like)
• Example: install “Django” module (Angular)
• “pip install Django”
Import modules
Import modules
• normal import (import entire module with ALL properties)
• from import (import required properties from a module.. ..not all module’s
features are available ..example: only a function from a module)
PYTHON LIMITATIONS
PYTHON LIMITATIONS
• Performance (interpreted)
• Not Mobile: not available in mobile applications! NO, not
true to date …now you can have!
https://www.ongraph.com/a-list-of-top-10-python-
frameworks-for-app-development/
PYTHON BEST MODULES
WE CAN HAVE PYTHON MODULES OF ANY TYPES
Below a short list:
- Mongo
- SQLAlchemy
- Wx Phyton
- Twisted
- Mathplotlib
- Requests
- Beautiful Soap
- Pygame
- Fabric
http://blog.stoneriverelearning.com/20-great-python-libraries-you-must-know/
PYTHON BEST FRAMEWORKS
BEST FRAMEWORS
Below a short list:
- Django
- Flask
- Web2py
- Pandas
- Bottle
- Falcon
- TurboGears
- NumPy
https://www.ongraph.com/a-list-of-top-10-python-frameworks-for-app-development/
FLASK (for Python)
FLASK
Flask is a micro-web framework, thus does not need
particular tools or libraries. It built-in with development
server and support for unit testing. This Unicode based
platform supports RESTFUL ask for dispatching and is
broadly reported for application developers to begin.
Course: Great Free Course @Harvard.edu https://online-
learning.harvard.edu/course/cs50s-web-programming-
python-and-javascript?delta=0
http://flask.pocoo.org/
FLASK (for Python) Dev Environment
FLASK Dev Environment - Install
Install Windows Flask Dev Env
4 Steps:
-Install Python
-Install Pip
-Install VirtualEnv
-Install VirtualEnvWrapper-win
http://timmyreilly.azurewebsites.net/python-flask-windows-
development-environment-setup/
FLASK (for Python) Dev Environment
FLASK Dev Environment
USAGE
7 Steps:
-Make a Virtual Environment
-Connect our project with our Environment
-Set Project Directory
-Deactivate
-Workon
-Pip Install
-Flask!
FLASK IS FUN!
FLASK IS FUN!
http://flask.pocoo.org/
https://realpython.com/flask-by-example-part-1-project-setup/
http://timmyreilly.azurewebsites.net/python-flask-windows-development-
environment-setup/
https://medium.freecodecamp.org/how-to-build-a-web-application-using-flask-
and-deploy-it-to-the-cloud-3551c985e492
FLASK DEMO: TIC-TAC-TOC
FLASK TIC-TAC-TOC
Tic Tac Toe using Flask framework and Angular. AI uses
the minimax algorithm to calculate moves.
https://github.com/Buuntu/minimax-algorithm
Angular + Python + Flask — Full stack
https://medium.com/@balramchavan/angular-python-
flask-full-stack-demo-27192b8de1a3
FLASK DEMO: TIC-TAC-TOC
FLASK TIC-TAC-TOC – PART OF CODE
EXAMPLE: CONSUMING a Dynamics 365
Business Central APIs from PYTHON
https://robertostefanettinavblog.com/2019/03/09/cons
uming-business-central-apis-from-python/
EXAMPLE: CONSUMING a Dynamics 365
Business Central APIs from PYTHON
Python & Flask – Best Links
Python.org
https://www.python.org/
Python Tutorial
https://www.w3schools.com/python/
Flask Tutorial (best Web micro-framework)
https://github.com/rstefanetti/SPGISummer2018-FlaskTutorial
https://medium.freecodecamp.org/how-to-build-a-web-application-using-flask-and-deploy-it-to-the-cloud-
3551c985e492
https://www.linkedin.com/learning/building-web-apis-with-flask?trk=search-cluster_flagship_learning
http://timmyreilly.azurewebsites.net/python-flask-windows-development-environment-setup/
Example of System Integrations with Python
https://robertostefanettinavblog.com/2019/03/09/consuming-business-central-apis-from-python/
RobertoStefanetti, MVPBusinessApplications
MicrosoftEducationInfluencer
https://robertostefanettinavblog.com

Más contenido relacionado

La actualidad más candente

Python basics_ part1
Python basics_ part1Python basics_ part1
Python basics_ part1Elaf A.Saeed
 
Scala uma poderosa linguagem para a jvm
Scala   uma poderosa linguagem para a jvmScala   uma poderosa linguagem para a jvm
Scala uma poderosa linguagem para a jvmIsaias Barroso
 
Functions, List and String methods
Functions, List and String methodsFunctions, List and String methods
Functions, List and String methodsPranavSB
 
Domain Driven Design Made Functional with Python
Domain Driven Design Made Functional with Python Domain Driven Design Made Functional with Python
Domain Driven Design Made Functional with Python Jean Carlo Machado
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsRuth Marvin
 
Functional Thinking - Programming with Lambdas in Java 8
Functional Thinking - Programming with Lambdas in Java 8Functional Thinking - Programming with Lambdas in Java 8
Functional Thinking - Programming with Lambdas in Java 8Ganesh Samarthyam
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageDr.YNM
 
Mastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsMastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsRuth Marvin
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTESNi
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of FlatteryJosé Paumard
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Paige Bailey
 

La actualidad más candente (20)

Python
PythonPython
Python
 
Spsl iv unit final
Spsl iv unit  finalSpsl iv unit  final
Spsl iv unit final
 
Python basics_ part1
Python basics_ part1Python basics_ part1
Python basics_ part1
 
Python Session - 5
Python Session - 5Python Session - 5
Python Session - 5
 
Scala uma poderosa linguagem para a jvm
Scala   uma poderosa linguagem para a jvmScala   uma poderosa linguagem para a jvm
Scala uma poderosa linguagem para a jvm
 
Functions, List and String methods
Functions, List and String methodsFunctions, List and String methods
Functions, List and String methods
 
Lambda Functions in Java 8
Lambda Functions in Java 8Lambda Functions in Java 8
Lambda Functions in Java 8
 
Python Part 2
Python Part 2Python Part 2
Python Part 2
 
Beginning Python
Beginning PythonBeginning Python
Beginning Python
 
Domain Driven Design Made Functional with Python
Domain Driven Design Made Functional with Python Domain Driven Design Made Functional with Python
Domain Driven Design Made Functional with Python
 
Python Part 1
Python Part 1Python Part 1
Python Part 1
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_arguments
 
Functional Thinking - Programming with Lambdas in Java 8
Functional Thinking - Programming with Lambdas in Java 8Functional Thinking - Programming with Lambdas in Java 8
Functional Thinking - Programming with Lambdas in Java 8
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Mastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsMastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operations
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
What is Python?
What is Python?What is Python?
What is Python?
 
Python in 90 minutes
Python in 90 minutesPython in 90 minutes
Python in 90 minutes
 

Similar a Python for dummies

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAdam Getchell
 
PRESENTATION ON PYTHON.pptx
PRESENTATION ON PYTHON.pptxPRESENTATION ON PYTHON.pptx
PRESENTATION ON PYTHON.pptxabhishek364864
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answerskavinilavuG
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answersRojaPriya
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizeIruolagbePius
 
Python introduction
Python introductionPython introduction
Python introductionRoger Xia
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxRohitKumar639388
 
James Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonJames Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonCP-Union
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfExaminationSectionMR
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python ProgrammingDozie Agbo
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2sadhana312471
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxusvirat1805
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An IntroductionSwarit Wadhe
 

Similar a Python for dummies (20)

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
PRESENTATION ON PYTHON.pptx
PRESENTATION ON PYTHON.pptxPRESENTATION ON PYTHON.pptx
PRESENTATION ON PYTHON.pptx
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Python introduction
Python introductionPython introduction
Python introduction
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
 
Python ppt
Python pptPython ppt
Python ppt
 
James Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonJames Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on Python
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdf
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
Python training
Python trainingPython training
Python training
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptx
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 

Más de Roberto Stefanetti

Microsoft Azure - Passaggio al Cloud
Microsoft Azure - Passaggio al CloudMicrosoft Azure - Passaggio al Cloud
Microsoft Azure - Passaggio al CloudRoberto Stefanetti
 
Dynamics 365 Business Central Wave 2 - Fast Tracks
Dynamics 365 Business Central Wave 2 - Fast TracksDynamics 365 Business Central Wave 2 - Fast Tracks
Dynamics 365 Business Central Wave 2 - Fast TracksRoberto Stefanetti
 
Microsoft Power BI - Concetti base
Microsoft Power BI - Concetti base Microsoft Power BI - Concetti base
Microsoft Power BI - Concetti base Roberto Stefanetti
 
Microsoft Dynamics 365 Business Central - ITA
Microsoft Dynamics 365 Business Central - ITAMicrosoft Dynamics 365 Business Central - ITA
Microsoft Dynamics 365 Business Central - ITARoberto Stefanetti
 
Business Central CRM Module (ITA)
Business Central CRM Module (ITA)Business Central CRM Module (ITA)
Business Central CRM Module (ITA)Roberto Stefanetti
 
MSDYN365 Business Central On-premise Vs Cloud SaaS
MSDYN365 Business Central On-premise Vs Cloud SaaSMSDYN365 Business Central On-premise Vs Cloud SaaS
MSDYN365 Business Central On-premise Vs Cloud SaaSRoberto Stefanetti
 
Microsoft Dynamics 365 Business Central April'19 release
Microsoft Dynamics 365 Business Central April'19 releaseMicrosoft Dynamics 365 Business Central April'19 release
Microsoft Dynamics 365 Business Central April'19 releaseRoberto Stefanetti
 
Implementing Microsoft Dynamics 356 Business Central On-Premise
Implementing Microsoft Dynamics 356 Business Central On-PremiseImplementing Microsoft Dynamics 356 Business Central On-Premise
Implementing Microsoft Dynamics 356 Business Central On-PremiseRoberto Stefanetti
 
Microsoft Dynamics 365 Business Central - Overview October 2018
Microsoft Dynamics 365 Business Central - Overview October 2018Microsoft Dynamics 365 Business Central - Overview October 2018
Microsoft Dynamics 365 Business Central - Overview October 2018Roberto Stefanetti
 
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business CentralMicrosoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business CentralRoberto Stefanetti
 
NAV 2018 What's new, December 14, 2017, Milan
NAV 2018 What's new, December 14, 2017, MilanNAV 2018 What's new, December 14, 2017, Milan
NAV 2018 What's new, December 14, 2017, MilanRoberto Stefanetti
 
GDPR Microsoft Strategies - Topics & Links
GDPR Microsoft Strategies - Topics & LinksGDPR Microsoft Strategies - Topics & Links
GDPR Microsoft Strategies - Topics & LinksRoberto Stefanetti
 
ForNAV la nostra soluzione per i reports con Dynamics NAV
ForNAV la nostra soluzione per i reports con Dynamics NAVForNAV la nostra soluzione per i reports con Dynamics NAV
ForNAV la nostra soluzione per i reports con Dynamics NAVRoberto Stefanetti
 
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017Roberto Stefanetti
 
VS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewVS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewRoberto Stefanetti
 
NAV 2013 Cost Accounting Module
NAV 2013 Cost Accounting ModuleNAV 2013 Cost Accounting Module
NAV 2013 Cost Accounting ModuleRoberto Stefanetti
 

Más de Roberto Stefanetti (20)

Microsoft Azure - Passaggio al Cloud
Microsoft Azure - Passaggio al CloudMicrosoft Azure - Passaggio al Cloud
Microsoft Azure - Passaggio al Cloud
 
Dynamics 365 Business Central Wave 2 - Fast Tracks
Dynamics 365 Business Central Wave 2 - Fast TracksDynamics 365 Business Central Wave 2 - Fast Tracks
Dynamics 365 Business Central Wave 2 - Fast Tracks
 
Microsoft Power BI - Concetti base
Microsoft Power BI - Concetti base Microsoft Power BI - Concetti base
Microsoft Power BI - Concetti base
 
Microsoft Dynamics 365 Business Central - ITA
Microsoft Dynamics 365 Business Central - ITAMicrosoft Dynamics 365 Business Central - ITA
Microsoft Dynamics 365 Business Central - ITA
 
Business Central CRM Module (ITA)
Business Central CRM Module (ITA)Business Central CRM Module (ITA)
Business Central CRM Module (ITA)
 
MSDYN365 Business Central On-premise Vs Cloud SaaS
MSDYN365 Business Central On-premise Vs Cloud SaaSMSDYN365 Business Central On-premise Vs Cloud SaaS
MSDYN365 Business Central On-premise Vs Cloud SaaS
 
Dynamics NAV Concetti Base
Dynamics NAV Concetti BaseDynamics NAV Concetti Base
Dynamics NAV Concetti Base
 
Microsoft Dynamics 365 Business Central April'19 release
Microsoft Dynamics 365 Business Central April'19 releaseMicrosoft Dynamics 365 Business Central April'19 release
Microsoft Dynamics 365 Business Central April'19 release
 
Implementing Microsoft Dynamics 356 Business Central On-Premise
Implementing Microsoft Dynamics 356 Business Central On-PremiseImplementing Microsoft Dynamics 356 Business Central On-Premise
Implementing Microsoft Dynamics 356 Business Central On-Premise
 
Microsoft Dynamics 365 Business Central - Overview October 2018
Microsoft Dynamics 365 Business Central - Overview October 2018Microsoft Dynamics 365 Business Central - Overview October 2018
Microsoft Dynamics 365 Business Central - Overview October 2018
 
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business CentralMicrosoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
 
NAV 2018 What's new, December 14, 2017, Milan
NAV 2018 What's new, December 14, 2017, MilanNAV 2018 What's new, December 14, 2017, Milan
NAV 2018 What's new, December 14, 2017, Milan
 
GDPR Microsoft Strategies - Topics & Links
GDPR Microsoft Strategies - Topics & LinksGDPR Microsoft Strategies - Topics & Links
GDPR Microsoft Strategies - Topics & Links
 
ForNAV la nostra soluzione per i reports con Dynamics NAV
ForNAV la nostra soluzione per i reports con Dynamics NAVForNAV la nostra soluzione per i reports con Dynamics NAV
ForNAV la nostra soluzione per i reports con Dynamics NAV
 
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
NAV 2018 and NAV New Technology - Fast Tracks - 14 dicembre 2017
 
NAV 2018 What's New
NAV 2018 What's NewNAV 2018 What's New
NAV 2018 What's New
 
C/SIDE-C/AL Vs VS Code-AL
C/SIDE-C/AL Vs VS Code-ALC/SIDE-C/AL Vs VS Code-AL
C/SIDE-C/AL Vs VS Code-AL
 
MRP and Planning Overview
MRP and Planning OverviewMRP and Planning Overview
MRP and Planning Overview
 
VS Code and Modern Development Environment Preview
VS Code and Modern Development Environment PreviewVS Code and Modern Development Environment Preview
VS Code and Modern Development Environment Preview
 
NAV 2013 Cost Accounting Module
NAV 2013 Cost Accounting ModuleNAV 2013 Cost Accounting Module
NAV 2013 Cost Accounting Module
 

Último

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
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
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
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
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
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.
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
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
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
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
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
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 ...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
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...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
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
 

Python for dummies

  • 2. WHAT IS PYTHON ? PYTHON ? https://www.python.org Python is an open source programming language that was made to be easy-to-read and powerful. A Dutch programmer named Guido van Rossum made Python in 1991. He named it after the television show Monty Python's Flying Circus
  • 4. PYTHON IS USED IN.. Python is used in... a lot of institutions! NASA, Facebook, Google, Mozilla, Yahoo, Dropbox, IBM, Youtube, iRobot, Maya, Paint apps etc. etc. … these “Giants” use Python in their “CORE products” and services!
  • 5. DOWNLOAD PYTHON Python can be run on Apache (Linux) and IIS (Windows) and in Visual Studio Code (as Python Extension) Python for Windows Download from https://www.python.org/downloads/windows/
  • 6. PYTHON for Visual Studio Code Python can be run also in Visual Studio Code (as Python Extension).. Nice for Business Central Developers…
  • 7. About Python Python is: • Programming language • Scripting language • Interpreted language (called AS IS) • Open Source (by Design) • Born between 1980-1990
  • 8. Python is for Python is for: “A lot of implementations” • Desktop App, Mobile App, Web App • AI & ML • Data Science • IoT (Internet of Things) • Interfaces…. ..and many other things
  • 9. Python can manage Python can manage: • UI • Databases • Calculations • Graphics • Scripting & Programming • Authentications & protocols
  • 10. Phyton Technology Python Technology • Object oriented language (polymorph, inheritance, overriding etc.) • Interpreted (copy and run fast!…) • Clear and simple code • Language is expandable with other sub languages (ex: Flask module) • Extensible (libraries) #import…. modules
  • 12. Source Code “.py” and “.pyc” Python Source Code • Extension code is “.py”  Python Code • Translated to byte code (complied to “.pyc”)  Compiled Python • On Virtual Machine  Written and compiled  but interpreted
  • 13. Syntax Syntax Python Identifier: a name used to identify a variable, function, class, module or other objects. An Identifier start with a letter A..Z or a..z or an _ (underscore) NO punctuation chars : @, $, % etc., is CASE SENSITIVE NO Braches for blocks (only indentation) # is a comment Python use ‘, ‘’, ‘’’ quote to define strings if Condition: Statement = ‘test’ else: OtherStatement = ‘test2’
  • 14. Data Types Data Types Major Python data types: String - ‘’ & “” List - [1,2,’aa’,True] Tuple - (34, 3.4, ‘aa’, True)  immutable Set/frozenset - set(1,2, ‘aa’,True) Hash Dictionary - {‘k1’:1, ‘k2’:False}  Groups of Keys and values
  • 15. Strings Strings String: a contiguous set of chars in quotation marks. Subset string: taken using slice operator ([], [:]) + = concatenation operator * = repetition operator
  • 16. Lists Lists Lists: separate by commas and enclosed in brackets [] (like C,C# arrays) Data Values: you can access to lists data values using with slice operators + = concatenation operator * = repetition operator
  • 17. Operators Python Operators (various) - Arithmetic - Relational - Conditional - Logical - Bitwise - Assignment - Special
  • 19. Conditionals Conditionals Statements If statement (boolean expression) If else statement (with optional else) Nested if statements (if nested in other if..)
  • 20. Loops Types of loops While loop For loop
  • 21. Functions Functions A function is an organized and “reusable” block of code. Many Built-in Functions are already available (ex: print) You can create your “user functions” A Function block start with def followed by name and () def my_function(fname): print(fname + " Refsnes") my_function("Emil") my_function("Tobias") my_function("Linus") def my_function(): print("Hello from a function") my_function()
  • 22. Functions Functions - return value & recursion def tri_recursion(k): if(k>0): result = k+tri_recursion(k-1) print(result) else: result = 0 return result print("nnRecursion Example Results") tri_recursion(6) def my_function(x): return 5 * x print(my_function(3)) print(my_function(5)) print(my_function(9))
  • 23. Function with Description Function with Descriptions cmp(listA, listB)  compare elements len(list)  total length max(list)  max & Min min(list) list(seq)  convert a tuple into a list
  • 24. Modules Python Module?  file containing python statements (DLL like) • “Divide and impera”  with modules • Module is a object with a lot of functions (like a function server or function package) • You can “Import Modules”
  • 25. Inheritance Inheritance ? > Sure, you can create a parent class and a child class class Person: def __init__(self, fname, lname): self.firstname = fname self.lastname = lname def printname(self): print(self.firstname, self.lastname) #Use the Person class to create an object, and then execute the printname method: x = Person("John", "Doe") x.printname() class Student(Person): pass x = Student("Mike", "Olsen") x.printname()
  • 26. Try-Except Try-Except • The try block lets you test a block of code for errors • The except block lets you handle the error • The finally block lets you execute code, regardless of the result of the try- and except blocks try: print(x) except: print("An exception occurred")
  • 27. Json (Convert from JSON to Python & Vice-versa) Json import json # some JSON: x = '{ "name":"John", "age":30, "city":"New York"}' # parse x: y = json.loads(x) # the result is a Python dictionary: print(y["age"]) Convert from JSON to Python: Convert from Python to JSON: import json # a Python object (dict): x = { "name": "John", "age": 30, "city": "New York" } # convert into JSON: y = json.dumps(x) # the result is a JSON string: print(y)
  • 28. Install “.pip” modules (Python installer packages) Install “.pip” modules (Python Modules: “DLL” like) • Example: install “Django” module (Angular) • “pip install Django”
  • 29. Import modules Import modules • normal import (import entire module with ALL properties) • from import (import required properties from a module.. ..not all module’s features are available ..example: only a function from a module)
  • 30. PYTHON LIMITATIONS PYTHON LIMITATIONS • Performance (interpreted) • Not Mobile: not available in mobile applications! NO, not true to date …now you can have! https://www.ongraph.com/a-list-of-top-10-python- frameworks-for-app-development/
  • 31. PYTHON BEST MODULES WE CAN HAVE PYTHON MODULES OF ANY TYPES Below a short list: - Mongo - SQLAlchemy - Wx Phyton - Twisted - Mathplotlib - Requests - Beautiful Soap - Pygame - Fabric http://blog.stoneriverelearning.com/20-great-python-libraries-you-must-know/
  • 32. PYTHON BEST FRAMEWORKS BEST FRAMEWORS Below a short list: - Django - Flask - Web2py - Pandas - Bottle - Falcon - TurboGears - NumPy https://www.ongraph.com/a-list-of-top-10-python-frameworks-for-app-development/
  • 33. FLASK (for Python) FLASK Flask is a micro-web framework, thus does not need particular tools or libraries. It built-in with development server and support for unit testing. This Unicode based platform supports RESTFUL ask for dispatching and is broadly reported for application developers to begin. Course: Great Free Course @Harvard.edu https://online- learning.harvard.edu/course/cs50s-web-programming- python-and-javascript?delta=0 http://flask.pocoo.org/
  • 34. FLASK (for Python) Dev Environment FLASK Dev Environment - Install Install Windows Flask Dev Env 4 Steps: -Install Python -Install Pip -Install VirtualEnv -Install VirtualEnvWrapper-win http://timmyreilly.azurewebsites.net/python-flask-windows- development-environment-setup/
  • 35. FLASK (for Python) Dev Environment FLASK Dev Environment USAGE 7 Steps: -Make a Virtual Environment -Connect our project with our Environment -Set Project Directory -Deactivate -Workon -Pip Install -Flask!
  • 36. FLASK IS FUN! FLASK IS FUN! http://flask.pocoo.org/ https://realpython.com/flask-by-example-part-1-project-setup/ http://timmyreilly.azurewebsites.net/python-flask-windows-development- environment-setup/ https://medium.freecodecamp.org/how-to-build-a-web-application-using-flask- and-deploy-it-to-the-cloud-3551c985e492
  • 37. FLASK DEMO: TIC-TAC-TOC FLASK TIC-TAC-TOC Tic Tac Toe using Flask framework and Angular. AI uses the minimax algorithm to calculate moves. https://github.com/Buuntu/minimax-algorithm Angular + Python + Flask — Full stack https://medium.com/@balramchavan/angular-python- flask-full-stack-demo-27192b8de1a3
  • 38. FLASK DEMO: TIC-TAC-TOC FLASK TIC-TAC-TOC – PART OF CODE
  • 39. EXAMPLE: CONSUMING a Dynamics 365 Business Central APIs from PYTHON https://robertostefanettinavblog.com/2019/03/09/cons uming-business-central-apis-from-python/
  • 40. EXAMPLE: CONSUMING a Dynamics 365 Business Central APIs from PYTHON
  • 41. Python & Flask – Best Links Python.org https://www.python.org/ Python Tutorial https://www.w3schools.com/python/ Flask Tutorial (best Web micro-framework) https://github.com/rstefanetti/SPGISummer2018-FlaskTutorial https://medium.freecodecamp.org/how-to-build-a-web-application-using-flask-and-deploy-it-to-the-cloud- 3551c985e492 https://www.linkedin.com/learning/building-web-apis-with-flask?trk=search-cluster_flagship_learning http://timmyreilly.azurewebsites.net/python-flask-windows-development-environment-setup/ Example of System Integrations with Python https://robertostefanettinavblog.com/2019/03/09/consuming-business-central-apis-from-python/