Submit Search
Upload
Wroc.py #32: Microservices in flask
•
1 like
•
487 views
K
Krzysztof Żuraw
Follow
How we are using flask to build microservices in python.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 17
Download now
Download to read offline
Recommended
Online Form Submission App
Online Form Submission App
Peeyush Ranjan
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...
Sunil kumar Mohanty
From mvc to viper
From mvc to viper
Krzysztof Profic
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
Abhijeet Vaikar
Indic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriver
IndicThreads
WinAppDriver - Windows Store Apps Test Automation
WinAppDriver - Windows Store Apps Test Automation
Jeremy Kao
Request Validation In Spring Rest-Part2
Request Validation In Spring Rest-Part2
Mohammad Sabir Khan
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
Recommended
Online Form Submission App
Online Form Submission App
Peeyush Ranjan
Microsoft identity platform and device authorization flow to use azure servic...
Microsoft identity platform and device authorization flow to use azure servic...
Sunil kumar Mohanty
From mvc to viper
From mvc to viper
Krzysztof Profic
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
Abhijeet Vaikar
Indic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriver
IndicThreads
WinAppDriver - Windows Store Apps Test Automation
WinAppDriver - Windows Store Apps Test Automation
Jeremy Kao
Request Validation In Spring Rest-Part2
Request Validation In Spring Rest-Part2
Mohammad Sabir Khan
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
Atlassian
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
Ganesh Kumar
Android CI and Appium
Android CI and Appium
Oren Ashkenazy
Ajaxppt
Ajaxppt
Iblesoft
Debugging lightning components
Debugging lightning components
Mohith Shrivastava
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
marcocasario
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
Sebastian Holstein
2010 08-26-smart-architecture
2010 08-26-smart-architecture
CHIP
Android sync adapter
Android sync adapter
Alex Tumanoff
Leave your jQuery behind
Leave your jQuery behind
Fabien Doiron
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
Bitbar
Angular Seminar-js
Angular Seminar-js
Mindfire Solutions
PyUIA 0.3
PyUIA 0.3
Jeremy Kao
Servlet to Spring: Internal Understanding
Servlet to Spring: Internal Understanding
Knoldus Inc.
open-west
open-west
Konnor Willison
iOS_Presentation
iOS_Presentation
Emannuel Carvalho
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
Ihor Uzhvenko
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
iOS UIAutomation
iOS UIAutomation
Jz Chang
Testing iOS10 Apps with Appium and its new XCUITest backend
Testing iOS10 Apps with Appium and its new XCUITest backend
Testplus GmbH
Angular JS Introduction
Angular JS Introduction
Dhyego Fernando
Browser_Stack_Intro
Browser_Stack_Intro
Mithilesh Singh
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
More Related Content
What's hot
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
Ganesh Kumar
Android CI and Appium
Android CI and Appium
Oren Ashkenazy
Ajaxppt
Ajaxppt
Iblesoft
Debugging lightning components
Debugging lightning components
Mohith Shrivastava
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
marcocasario
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
Sebastian Holstein
2010 08-26-smart-architecture
2010 08-26-smart-architecture
CHIP
Android sync adapter
Android sync adapter
Alex Tumanoff
Leave your jQuery behind
Leave your jQuery behind
Fabien Doiron
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
Bitbar
Angular Seminar-js
Angular Seminar-js
Mindfire Solutions
PyUIA 0.3
PyUIA 0.3
Jeremy Kao
Servlet to Spring: Internal Understanding
Servlet to Spring: Internal Understanding
Knoldus Inc.
open-west
open-west
Konnor Willison
iOS_Presentation
iOS_Presentation
Emannuel Carvalho
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
Ihor Uzhvenko
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
iOS UIAutomation
iOS UIAutomation
Jz Chang
Testing iOS10 Apps with Appium and its new XCUITest backend
Testing iOS10 Apps with Appium and its new XCUITest backend
Testplus GmbH
Angular JS Introduction
Angular JS Introduction
Dhyego Fernando
What's hot
(20)
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
A Detailed Guide to Securing React applications with Keycloak - WalkingTree ...
Android CI and Appium
Android CI and Appium
Ajaxppt
Ajaxppt
Debugging lightning components
Debugging lightning components
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
Data Flow Patterns in Angular 2 - Sebastian Müller
Data Flow Patterns in Angular 2 - Sebastian Müller
2010 08-26-smart-architecture
2010 08-26-smart-architecture
Android sync adapter
Android sync adapter
Leave your jQuery behind
Leave your jQuery behind
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
Angular Seminar-js
Angular Seminar-js
PyUIA 0.3
PyUIA 0.3
Servlet to Spring: Internal Understanding
Servlet to Spring: Internal Understanding
open-west
open-west
iOS_Presentation
iOS_Presentation
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
iOS UIAutomation
iOS UIAutomation
Testing iOS10 Apps with Appium and its new XCUITest backend
Testing iOS10 Apps with Appium and its new XCUITest backend
Angular JS Introduction
Angular JS Introduction
Similar to Wroc.py #32: Microservices in flask
Browser_Stack_Intro
Browser_Stack_Intro
Mithilesh Singh
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
LvivPy - Flask in details
LvivPy - Flask in details
Max Klymyshyn
Android & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
Appium
Appium
Keshav Kashyap
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
Jen Looper
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
Digamber Singh
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Inexture Solutions
Angular2RoutingSetupByShubham
Angular2RoutingSetupByShubham
Shubham Verma
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
Lou Sacco
Getting started with appium
Getting started with appium
Pratik Patel
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
Oro Inc.
Creating custom Validators on Reactive Forms using Angular 6
Creating custom Validators on Reactive Forms using Angular 6
AIMDek Technologies
How to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAM
Provectus
Appium
Appium
Deepshikha Singh
Application Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The Ugly
Richard Lord
Spring security jwt tutorial toptal
Spring security jwt tutorial toptal
jbsysatm
Appium understanding document
Appium understanding document
Akshay Pillay
Indic threads pune12-using play2.0 for building an insurance website
Indic threads pune12-using play2.0 for building an insurance website
IndicThreads
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
Mark Meyer
Similar to Wroc.py #32: Microservices in flask
(20)
Browser_Stack_Intro
Browser_Stack_Intro
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
LvivPy - Flask in details
LvivPy - Flask in details
Android & iOS Automation Using Appium
Android & iOS Automation Using Appium
Appium
Appium
Telerik AppBuilder Presentation for TelerikNEXT Conference
Telerik AppBuilder Presentation for TelerikNEXT Conference
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Easy Step-by-Step Guide to Develop REST APIs with Django REST Framework
Angular2RoutingSetupByShubham
Angular2RoutingSetupByShubham
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
Getting started with appium
Getting started with appium
Adding custom ui controls to your application (1)
Adding custom ui controls to your application (1)
Creating custom Validators on Reactive Forms using Angular 6
Creating custom Validators on Reactive Forms using Angular 6
How to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAM
Appium
Appium
Application Frameworks - The Good, The Bad & The Ugly
Application Frameworks - The Good, The Bad & The Ugly
Spring security jwt tutorial toptal
Spring security jwt tutorial toptal
Appium understanding document
Appium understanding document
Indic threads pune12-using play2.0 for building an insurance website
Indic threads pune12-using play2.0 for building an insurance website
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
Recently uploaded
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Recently uploaded
(20)
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Wroc.py #32: Microservices in flask
1.
Krzysztof Zuraw Microservices in
Flask
2.
Agenda Aplikacja monolityczna 2 Flask
3.
Agenda Deploy 3 Testowanie
4.
Aplikacja monolityczna 4
5.
Aplikacja monolityczna 5 from app.users.models import
UserSiteProfile from app.utils.cache import cache_key_user from app.sites.models import SiteProfile from app.sites.utils import site_terms from app.utils.users import get_homepage_url from app.utils.views import ThemedFormView, ThemedTemplateView from app.authentication import signals from app.authentication.forms import AuthForm, EmailForm from app.authentication.idp import ( is_valid_idp, MultipleIDPError, saml_available, site_idp, user_idp_lookup) from app.authentication.loginchecks import ( check_account_expiration, get_site_login_errors, pre_login_checks) from app.saml.utils import site_specific_config_loader from app.saml.views import _get_subject_id
6.
Aplikacja monolityczna 6
7.
7 Niczego nie narzuca Flexible
ale bez ‘bateries included’
8.
Flask-Script 8 flask-script.readthedocs.io/en/latest/ from flask.ext.script import
Manager, Shell, Server from my_app.application import app manager = Manager(app) manager.add_command( 'runserver' , Server(host= '0.0.0.0', port=7000, use_debugger= True) )
9.
Flask-RESTful 9 flask-restful.readthedocs.io/en/0.3.5/ from flask_restful import
Resource class MyResource(Resource): def get(): return {'OK'} @api.representation('application/xml' ) def output_xml(data, code, headers= None): response = make_response(dicttoxml.dicttoxml(data), code) inject_headers(response, headers) return response
10.
Marshallow & flask-marshallow 10 marshmallow.readthedocs.io/en/latest/index.html ma
= Marshmallow(app) class CustomSchema(ma.Schema): id = ma.Int(dump_only= True) name = ma.Str(required= True) url = ma.Url(relative= True) @app.route('/api/custom/<id>' ) def users(): all_obj = Object.all() result = object_schema.dump(all_obj) return jsonify(result.data)
11.
Flask-SQLAlchemy 11 flask-sqlalchemy.pocoo.org/2.1/ from flask.ext.sqlalchemy import
SQLAlchemy db = SQLAlchemy(app) class MyModel(db.Model): GROUP = 'group' USER = 'user' TYPES = [ (GROUP, GROUP), (USER, USER), ] __tablename__ = 'my_model' id = db.Column(db.Integer, primary_key= True) model_type = db.Column(ChoiceType(TYPES)) model_value_id = db.Column(db.Integer, db.ForeignKey( 'model_value.id' )) value = db.Column(db.String( 1024)) def __init__(self, model_type, model_value_id, value): self.share_type = share_type self.rule_value_id = rule_value_id self.value = value
12.
Flask-Migrate 12 flask-migrate.readthedocs.io/en/latest/ def upgrade(): op.create_table( 'my_model', sa.Column( 'id',
sa.Integer(), nullable= False), sa.Column( 'model_type' , sqlalchemy_utils.types.choice.ChoiceType(TYPES), nullable= True ), sa.PrimaryKeyConstraint( 'id'), sa.Column( 'value', sa.String(length= 1024), nullable= True), ) op.create_table( 'my_model_values' , sa.Column( 'id', sa.Integer(), nullable= False), sa.Column( 'model_value_id' , sa.Integer(), nullable= True), sa.Column( 'value', sa.String(length= 1024), nullable= True), sa.ForeignKeyConstraint([ 'model_value_id' ], ['my_model.id' ]), sa.PrimaryKeyConstraint( 'id') )
13.
Testowanie 13
14.
14 Deployment R10k: github.com/puppetlabs/r10k
15.
15 Cookiecutter cookiecutter.readthedocs.io/en/latest/ . └── flask_microservice ├──
AUTHORS.rst ├── debian ├── docs │ ├── make.bat │ ├── Makefile │ └── source │ ├── authors.rst │ ├── conf.py │ ├── contributing.rst │ ├── history.rst │ ├── index.rst │ ├── readme.rst │ ├── technical_details.rst │ └── usage.rst ├── HISTORY.rst ├── MANIFEST.in ├── README.rst ├── requirements.txt ├── setup.cfg ├── setup.py ├── src │ ├── flask_microservice │ │ ├── application.py │ │ ├── default_config.ini │ │ ├── __init__.py │ │ └── manage.py │ └── tests │ ├── conftest.py │ └── test_flask_microservice.py └── tox.ini
16.
16 Dh- virtualenv dh-virtualenv.readthedocs.io/en/latest/ override_dh_auto_test: echo "SKIPPING
TESTS" %: dh $@ --with python-virtualenv override_dh_virtualenv: dh_virtualenv --python /usr/bin/python2.7 --setuptools --preinstall pip==6.1.1 --preinstall setuptools==18.7.1 --preinstall wheel==0.26.0 override_dh_builddeb: dh_builddeb --destdir= ${DESTINATION_DPKG_DIR }
17.
QUESTIONS 17 Contact: @krzyszof_zuraw krzysztofzuraw.com
Download now