Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Web backends development using Python

38,165 views

Published on

PyCon HK 2015

Published in: Software, Technology
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Web backends development using Python

  1. Web backends development using Python Ayun Park
  2. Ayun Park iamparkayun@gmail.com / http://parkayun.kr / https://github.com/Parkayun 2
  3. add2paper http://www.add2paper.com / http://www.additpay.com Korea No.1 Mobile media for college students. 3
  4. 4
  5. 5 122 universities
  6. 6
  7. 7
  8. based on django 8
  9. used flask 9
  10. used tornado 10
  11. tried aiohttp 11
  12. django, flask, tornado and aiohttp 12
  13. django Most popular Python web framework Full stack web framework 13
  14. Most popular 14
  15. Full stack web framework 15
  16. = has almost everything 16
  17. Full stack ORM Template Engine Tests And more... 17
  18. ORM 18
  19. ORM 19
  20. ORM >>> Foo.objects.filter(bar__contains=’1’) SELECT "world_foo"."id", "world_foo"."bar", "world_foo"."created_at", "world_foo"."modified_at" FROM "world_foo" WHERE "world_foo"."bar" LIKE ‘%1%’ ESCAPE '' LIMIT 21 20
  21. ORM MySQL PostgreSQL Oracle MSSQL (unofficial) 21
  22. template engine 22
  23. template engine a lot of useful builtin tags intcomma autoescape linebreaks also can make custom tags 23
  24. tests based on unittest TestCase TransactionTestCase LiveServerTestCase 24
  25. And more... django admin useful middlewares session management protection against csrf attack migration And more... in djangoproject.com 25
  26. = django has super productivity 26
  27. In my case 27
  28. I use django when need web pages(html). 28
  29. django was born for web sites. 29
  30. flask Very popluar Python web framework in developers Microframework 30
  31. Very popular 31
  32. Werkzeug jinja2 useful extensions Microframework 32
  33. Werkzeug 33
  34. = WSGI Utility Library 34
  35. = HTTP Server using Python (PEP333) 35
  36. = URL Route and Response 36
  37. jinja2 37
  38. = template engine 38
  39. similar with django’s 39
  40. Microframework 40
  41. = has almost nothing 41
  42. = has free 42
  43. = useful extensions 43
  44. SQLAlchemy (Flask-SQLAlchemy) ORM Alembic (Flask-Alembic) Migration Flask-Login session management useful extensions 44
  45. In my case 45
  46. I use flask in anytime. 46
  47. flask is a microframework. 47
  48. tornado Web framework Asynchronous network library 48
  49. Web framework 49
  50. similar with flask 50
  51. = has template engine 51
  52. also, similar with django’s 52
  53. but, It hasn’t enough bulitin tags. 53
  54. Asynchronous network library 54
  55. = tornado’s key feature 55
  56. After, Python2 56
  57. has asyncio 57
  58. = has async features 58
  59. But, tornado has that since Python2. 59
  60. = has good performance since Python2 60
  61. = can code socket and more 61
  62. = even as a container 62
  63. In my case 63
  64. I use tornado when build websocket and use nosql. 64
  65. Async is tornado’s key feature. 65
  66. Not use async with rdbms. 66
  67. or as a wsgi container 67
  68. aiohttp HTTP Client / Server for asyncio 68
  69. HTTP Server for asyncio. 69
  70. = HTTP Server for Python3. 70
  71. = like a werkzeug in flask. 71
  72. = URL Route and Response 72
  73. In my case 73
  74. I use aiohttp when build websocket or try experiment. 74
  75. There are some async rdbms driver for Python3. 75
  76. I just started web framework based on aiohttp. 76
  77. In github Parkayun/astrid 77
  78. In Real World 78
  79. Yes, Python is slow. 79
  80. check transaction. 80
  81. check file io. 81
  82. ‘’.join((‘a’, ‘b’)) > ‘a’ + ‘b’ 82
  83. use Cache (redis, memcached) 83
  84. uWSGI > gunicorn 84
  85. use gevent 85
  86. use PyPy 86
  87. normal stack 87
  88. django / flask 88 uWSGI / gunicron nginx / apache MySQL / PostgreSQL / Oracle / MSSQL Cache (redis / memcached / rabbitmq) reverse proxy
  89. Thanks a lot!

×