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
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
ngoud9212
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
jimielynbastida
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Softradix Technologies
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
MarianaLemus7
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
Recently uploaded
(20)
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
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