Python Microservices Development

Total Page:16

File Type:pdf, Size:1020Kb

Python Microservices Development Python Microservices Development Build, test, deploy, and scale microservices in Python Tarek Ziadé BIRMINGHAM - MUMBAI Python Microservices Development Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: July 2017 Production reference: 1210717 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78588-111-4 www.packtpub.com Credits Author Copy Editor Tarek Ziadé Sonia Mathur Reviewer Project Coordinator William Kahn-Greene Vaidehi Sawant Commissioning Editor Proofreader Aaron Lazar Safis Editing Acquisition Editor Indexer Chaitanya Nair Mariammal Chettiyar Content Development Editor Graphics Rohit Kumar Singh Jason Monteiro Technical Editor Production Coordinator Pavan Ramchandani Nilesh Mohite About the Author Tarek Ziadé is a Python developer, located in the countryside near Dijon, France. He works at Mozilla in the services team. He founded a French Python user group called Afpy, and he has written several books about Python in French and English. When he is not hacking on his computer or hanging out with his family, he's spending time between his two passions, running and playing the trumpet. You can visit his personal blog (Fetchez le Python) and follow him on Twitter (@tarek_ziade). You can also take a look at one of his books on Amazon, Expert Python Programming, published by Packt. I would like to thank the Packt team for their help, and the following hackers who helped me: Stéfane Fermigier, William Kahn-Greene, Chris Kolosiwsky, Julien Vehent, and Ryan Kelly. I would also like to thank Amina, Milo, Suki, and Freya for their love and patience. I hope you will enjoy this book as much as I’ve enjoyed writing it! About the Reviewer William Kahn-Greene has been writing Python and building applications on the web since the late 90s. He works in the crash-stats group on the crash ingestion pipeline at Mozilla and also maintains a variety of Python libraries, including bleach. When he’s waiting for CI to test his code changes, he’s building things with wood, tending to his tomato plant, and cooking for four. www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBook. h t t p s ://w w w . p a c k t p u b . c o m /m a p t Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at h t t p s ://w w w . a m a z o n . c o m /d p /1785881116. If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products! Table of Contents Preface 1 Chapter 1: Understanding Microservices 8 Origins of Service-Oriented Architecture 9 The monolithic approach 10 The microservice approach 14 Microservice benefits 16 Separation of concerns 16 Smaller projects 16 Scaling and deployment 17 Microservices pitfalls 18 Illogical splitting 18 More network interactions 19 Data storing and sharing 19 Compatibility issues 20 Testing 20 Implementing microservices with Python 21 The WSGI standard 22 Greenlet and Gevent 23 Twisted and Tornado 25 asyncio 26 Language performances 29 Summary 31 Chapter 2: Discovering Flask 33 Which Python? 35 How Flask handles requests 35 Routing 39 Variables and converters 40 The url_for function 43 Request 44 Response 45 Flask built-in features 47 The session object 47 Globals 48 Signals 49 Extensions and middlewares 51 Templates 52 Configuration 54 Blueprints 56 Error handling and debugging 57 Custom error handler 58 The debug mode 60 A microservice skeleton 61 Summary 64 Chapter 3: Coding, Testing, and Documenting - the Virtuous Cycle 65 Different kinds of tests 67 Unit tests 68 Functional tests 71 Integration tests 73 Load tests 74 End-to-end tests 77 Using WebTest 79 Using pytest and Tox 80 Developer documentation 83 Continuous Integration 88 Travis-CI 89 ReadTheDocs 90 Coveralls 91 Summary 94 Chapter 4: Designing Runnerly 95 The Runnerly application 96 User stories 96 Monolithic design 98 Model 98 View and Template 99 Background tasks 103 Strava token 106 Authentication and authorization 107 Putting together the monolithic design 111 Splitting the monolith 112 Data Service 114 Using Open API 2.0 115 More splitting 118 Summary 119 [ ii ] Chapter 5: Interacting with Other Services 121 Synchronous calls 122 Using Session in a Flask app 123 Connection pooling 127 HTTP cache headers 129 Improving data transfer 132 GZIP compression 132 Binary payloads 134 Putting it together 137 Asynchronous calls 137 Task queues 138 Topic queues 139 Publish/subscribe 144 RPC over AMQP 144 Putting it together 145 Testing 145 Mocking synchronous calls 145 Mocking asynchronous calls 147 Mocking Celery 147 Mocking other asynchronous calls 149 Summary 150 Chapter 6: Monitoring Your Services 151 Centralizing logs 152 Setting up Graylog 154 Sending logs to Graylog 157 Adding extra fields 159 Performance metrics 161 System metrics 161 Code metrics 164 Web server metrics 166 Summary 168 Chapter 7: Securing Your Services 169 The OAuth2 protocol 170 Token-based authentication 172 The JWT standard 173 PyJWT 175 X.509 certificate-based authentication 176 The TokenDealer microservice 179 The POST/oauth/token implementation 180 [ iii ] Using TokenDealer 184 Web application firewall 186 OpenResty - Lua and nginx 188 Rate and concurrency limiting 191 Other OpenResty features 193 Securing your code 194 Asserting incoming data 194 Limiting your application scope 198 Using Bandit linter 199 Summary 202 Chapter 8: Bringing It All Together 204 Building a ReactJS dashboard 205 The JSX syntax 206 React components 207 ReactJS and Flask 210 Using Bower, npm, and Babel 211 Cross-origin resource sharing 215 Authentication and authorization 218 Interacting with Data Service 218 Getting the Strava token 219 JavaScript authentication 221 Summary 223 Chapter 9: Packaging and Running Runnerly 225 The packaging toolchain 226 A few definitions 227 Packaging 228 The setup.py file 228 The requirements.txt file 233 The MANIFEST.in file 235 Versioning 236 Releasing 239 Distributing 241 Running all microservices 244 Process management 246 Summary 250 Chapter 10: Containerized Services 251 What is Docker? 252 Docker 101 254 Running Flask in Docker 256 [ iv ] The full stack - OpenResty, Circus and Flask 258 OpenResty 259 Circus 261 Docker-based deployments 264 Docker Compose 265 Introduction to Clustering and Provisioning 267 Summary 270 Chapter 11: Deploying on AWS 271 AWS overview 272 Routing - Route53, ELB, and AutoScaling 274 Execution - EC2 and Lambda 274 Storage - EBS, S3, RDS, ElasticCache, and CloudFront 276 Messaging - SES, SQS, and SNS 277 Simple Email Service (SES) 277 Simple Queue Service (SQS) 278 Simple Notification Service (SNS) 278 Provisioning and deployment - CloudFormation and ECS 279 Deploying on AWS - the basics 280 Setting up your AWS account 280 Deploying on EC2 with CoreOS 284 Deploying with ECS 288 Route53 294 Summary 296 Chapter 12: What Next? 297 Iterators and generators 298 Coroutines 301 The asyncio library 303 The aiohttp framework 304 Sanic 305 Asynchronous versus synchronous 306 Summary 309 Index 310 [ v ] Preface If we try to deploy our web applications into the cloud, it requires our code to interact with many third-party services. Using microservice architectures, you can build applications that will allow you to manage these interactions. However, this comes with its own set of challenges, since each set has its own complexity, and getting their interaction right isn't easy. This easy-to-follow guide covers techniques to help you overcome these challenges. You will learn how to best design, write, test, and deploy your microservices. The real- world examples will help Python developers create their own Python microservices using the most efficient methods. By the end of this book, you will have acquired the skills to craft applications that are built as small standard units, using all the proven best practices and avoiding the usual traps.
Recommended publications
  • Pylons Reference Documentation Release 1.0.2
    Pylons Reference Documentation Release 1.0.2 Ben Bangert, Graham Higgins, James Gardner, Philip Jenvey January 12, 2018 Contents 1 Getting Started 1 1.1 Requirements...............................................1 1.2 Installing.................................................1 1.3 Creating a Pylons Project........................................3 1.4 Running the application.........................................4 1.5 Hello World...............................................4 2 Concepts of Pylons 7 2.1 The ‘Why’ of a Pylons Project......................................7 2.2 WSGI Applications...........................................8 2.3 WSGI Middleware............................................8 2.4 Controller Dispatch........................................... 10 2.5 Paster................................................... 10 2.6 Loading the Application......................................... 11 3 Controllers 13 3.1 Standard Controllers........................................... 14 3.2 Using the WSGI Controller to provide a WSGI service......................... 16 3.3 Using the REST Controller with a RESTful API............................ 17 3.4 Using the XML-RPC Controller for XML-RPC requests........................ 20 4 Views 23 4.1 Templates................................................. 24 4.2 Passing Variables to Templates...................................... 24 4.3 Default Template Variables....................................... 25 4.4 Configuring Template Engines...................................... 26 4.5 Custom
    [Show full text]
  • The Pyramid Web Application Development Framework Version 1.1
    The Pyramid Web Application Development Framework Version 1.1 Chris McDonough CONTENTS Front Matteri Copyright, Trademarks, and Attributions iii Attributions............................................ iv Print Production.......................................... iv Contacting The Publisher..................................... iv HTML Version and Source Code................................. iv Typographical Conventionsv Author Introduction vii Audience............................................. vii Book Content........................................... viii The Genesis of repoze.bfg .................................. viii The Genesis of Pyramid...................................... ix Thanks............................................... ix I Narrative Documentation1 1 Pyramid Introduction3 1.1 What Is The Pylons Project?................................4 1.2 Pyramid and Other Web Frameworks............................4 2 Installing Pyramid7 2.1 Before You Install......................................7 2.1.1 If You Don’t Yet Have A Python Interpreter (UNIX)...............7 2.1.2 If You Don’t Yet Have A Python Interpreter (Windows)..............9 2.2 Installing Pyramid on a UNIX System...........................9 2.2.1 Installing the virtualenv Package....................... 10 2.2.2 Creating the Virtual Python Environment..................... 10 2.2.3 Installing Pyramid Into the Virtual Python Environment............. 11 2.3 Installing Pyramid on a Windows System......................... 11 2.4 Installing Pyramid on Google App Engine........................
    [Show full text]
  • The Jumpgate Definitive Guide
    THE JUMPGATE DEFINITIVE GUIDE Compiled by: Odiche Special Thanks to: NETDEVIL© NewDawn IkeProf RazorKiss Lady Dracoe SpaceDrake Zalty’s And all the Pilots I have forgotten to thank! FACTIONS Solrain: Medium-fast ships, heavy, fast-recharging shields. A little light on firepower, lots of flexibility in ship loadout because of a large number of MODx slots. (MODx are worth reading up on in JOSSH). All Solrain ships have buckets of cargo space... the Solrain Fighter-class ship, the Intensity can carry a full set of equipment in it's hold to re-equip a downed squadmate. The Solrain Bomber and Medium Fighter are top-of-the-line, and they have a good Light Transport as well. Solrain ships are fairly forgiving for a new pilot; the glut of Flashfire MODxes they can equip can ensure their survival in situations where any other ship would be gunned down before it could escape. Solrain ships often utilize hit and run techniques in combat to gain the maximum advantage from their fast-recharging shields. Solrain ships can generally re-equip to a fairly good degree from their home stations. Solrain are typically RPed (Roleplayed) as greedy, profiteering traders. Which they are. Assassins, Mercenaries, Pirates, Traders, or Factionalists. To piss off a Solrain pilot, call him a Smurf. Quantar: Usually have the fastest ships in a given class. They also have a medium load- out of MODx slots. Quantar ships rely on maneuvrability to evade incoming fire; the Quantar fighters, the Typhoon, is an ideal wolf-pack ship. Their speed can carry them out of most trouble; only scouts or an Intensity can really catch them up, and if you are a skilled pilot, you can evade and escape from those also.
    [Show full text]
  • Comparative Study on Python Web Frameworks: Flask and Django
    Devndra Ghimire Comparative study on Python web frameworks: Flask and Django Metropolia University of Applied Sciences Bachelor of Engineering Media Engineering Bachelor’s Thesis 5 May 2020 Abstract Devndra Ghimire Author(s) Comparative study on Python web frameworks: Flask and Title Django. Number of Pages 37 pages + 0 appendices Date 5 May 2010 Degree Bachelor of Engineering Degree Programme Media Engineering Specialisation option Software Engineering Instructor(s) Kari Salo, Senior Lecturer The purpose of the thesis was to the study the various features, advantages, and the limita- tion of two web development frameworks for Python programming language. It aims to com- pare the usage of Django and Flask frameworks from a novice point of view. The theoretical part of the thesis presents the various types of programming languages and web technolo- gies. In the practical part, however, the study is divided into two parts, each part observing the respective web application framework. In order to perform the comparison, a social network and eCommerce like application was built for Flask and Django respectively. The comparison was started by developing the social network application first with Flask and finished with the e-commerce application using Django. Python programing language, SQLite database for the backend and HTML, JavaS- cript, and Ajax were used for the frontend technology. At the end of the project, both appli- cations were deployed to the cloud platform called Heroku. After the comparison, it was found that the most significant advantages of Flask were that it provides simplicity, flexibility, fine-grained control and quick and easy to learn. On the other hand, Django was easy to work with because of its extensive features and support for librar- ies.
    [Show full text]
  • Release 0.8.0 Veit Schiele
    Jupyter Tutorial Release 0.8.0 Veit Schiele Oct 27, 2020 CONTENTS 1 Introduction 3 1.1 Status...................................................3 1.2 Target group...............................................3 1.3 Structure of the Jupyter tutorial.....................................3 1.4 Why Jupyter?...............................................4 1.5 Jupyter infrastructure...........................................4 2 First steps 5 2.1 Install Jupyter Notebook.........................................5 2.2 Create notebook.............................................7 2.3 Example.................................................9 2.4 Installation................................................ 12 2.5 Follow us................................................. 14 2.6 Pull-Requests............................................... 14 3 Workspace 15 3.1 IPython.................................................. 15 3.2 Jupyter.................................................. 38 4 Read and write data 123 4.1 Requests................................................. 123 4.2 BeautifulSoup.............................................. 128 4.3 Intake................................................... 129 4.4 PostgreSQL................................................ 144 4.5 NoSQL databases............................................ 162 4.6 Glossary................................................. 170 5 Clean up and validate data 175 5.1 Deduplicate data............................................. 175 5.2 String matching............................................
    [Show full text]
  • The Pyramid Web Application Development Framework Version 1.2.7
    The Pyramid Web Application Development Framework Version 1.2.7 Chris McDonough Contents Front Matteri Copyright, Trademarks, and Attributions iii Typographical Conventionsv Author Introduction vii I Narrative Documentation1 1 Pyramid Introduction3 2 Installing Pyramid 21 3 Application Configuration 29 4 Creating Your First Pyramid Application 33 5 Creating a Pyramid Project 39 6 URL Dispatch 61 7 Views 85 8 Renderers 95 9 Templates 109 10 View Configuration 123 11 Static Assets 137 12 Request and Response Objects 147 13 Sessions 157 14 Using Events 165 15 Environment Variables and .ini File Settings 169 16 Logging 181 17 Paste 189 18 Command-Line Pyramid 193 19 Internationalization and Localization 205 20 Virtual Hosting 223 21 Unit, Integration, and Functional Testing 227 22 Resources 235 23 Much Ado About Traversal 247 24 Traversal 255 25 Security 267 26 Combining Traversal and URL Dispatch 279 27 Using Hooks 289 28 Advanced Configuration 311 29 Extending An Existing Pyramid Application 321 30 Startup 327 31 Thread Locals 331 32 Using the Zope Component Architecture in Pyramid 335 II Tutorials 341 33 ZODB + Traversal Wiki Tutorial 343 34 SQLAlchemy + URL Dispatch Wiki Tutorial 389 35 Converting a repoze.bfg Application to Pyramid 439 36 Running Pyramid on Google’s App Engine 443 37 Running a Pyramid Application under mod_wsgi 449 III API Reference 453 38 pyramid.authorization 455 39 pyramid.authentication 457 40 pyramid.chameleon_text 459 41 pyramid.chameleon_zpt 461 42 pyramid.config 463 43 pyramid.events 465 44 pyramid.exceptions 467
    [Show full text]
  • Pylons Reference Documentation Release 1.0.2
    Pylons Reference Documentation Release 1.0.2 Ben Bangert, Graham Higgins, James Gardner, Philip Jenvey July 22, 2015 Contents 1 Getting Started 1 1.1 Requirements..............................................1 1.2 Installing................................................1 1.3 Creating a Pylons Project.......................................2 1.4 Running the application........................................4 1.5 Hello World...............................................4 2 Concepts of Pylons 7 2.1 The ‘Why’ of a Pylons Project.....................................7 2.2 WSGI Applications...........................................7 2.3 WSGI Middleware...........................................8 2.4 Controller Dispatch.......................................... 10 2.5 Paster.................................................. 10 2.6 Loading the Application........................................ 11 3 Controllers 13 3.1 Standard Controllers.......................................... 15 3.2 Using the WSGI Controller to provide a WSGI service...................... 17 3.3 Using the REST Controller with a RESTful API........................... 18 3.4 Using the XML-RPC Controller for XML-RPC requests...................... 21 4 Views 25 4.1 Templates................................................ 27 4.2 Passing Variables to Templates.................................... 27 4.3 Default Template Variables...................................... 28 4.4 Configuring Template Engines.................................... 29 4.5 Custom render() functions....................................
    [Show full text]
  • Versidad Autonoma De Bucaramanga Unab
    COMPARACION DEL DESARROLLO DE UN APLICATIVO WEB ENTRE LOS LENGUAJES DE PROGRAMACION PYTHON Y JAVA ANDRES FELIPE FOGLIA ARDILA UNIVERSIDAD AUTONOMA DE BUCARAMANGA UNAB FACULTAD DE INGENIERIA DE SISTEMAS GRUPO PRISMA LINEA DE TECNOLOGIA Y SOCIEDAD BUCARAMANGA 2014 COMPARACION DEL DESARROLLO DE UN APLICATIVO WEB ENTRE LOS LENGUAJES DE PROGRAMACION PYTHON Y JAVA ANDRES FELIPE FOGLIA ARDILA ANTEPROYECTO DE PROYECTO DE GRADO DIRECTOR DEL PROYECTO FREDDY MENDEZ ORTIZ , RENE LOBO QUINTERO DOCENTES DE LA FACULTAD DE INGENIERIA DE SISTEMAS UNIVERSIDAD AUTONOMA DE BUCARAMANGA UNAB FACULTAD DE INGENIERIA DE SISTEMAS GRUPO PRISMA LINEA DE TECNOLOGIA Y SOCIEDAD BUCARAMANGA 2014 CONTENIDO 1. Planteamiento del problema y justificación 2. Objetivos 3. Antecedentes 4. Estado del Arte 5. Marco teórico 5.1 Tecnología Java 5.2 Aplicaciones web en Java 5.3 Java Server Pages Technology 5.4 Tecnología Python 5.5 Desarrollo web en Python 6. Diseño metodológico 7. Informe Final 8. Evaluación del modelo de caracterización del aplicativo web 9. Conclusiones 10. Bibliografía 11. Anexos 11.1 QSOS 11.2 Modelo de caracterización del aplicativo web 1. PLANTEAMIENTO DEL PROBLEMA Y JUSTIFICACION En los últimos años se ha venido escuchando sobre Python un lenguaje de programación cada vez más conocido entre los programadores de todo el mundo por su elegante sintaxis, fácil manera de leer además de su gran facilidad que hace que programar no sea complicado, se dice también que este lenguaje va a ser el más utilizado y con el que más se va a trabajar en un futuro no muy lejano. Todas estas razones hacen pensar en por que no empezar a utilizar este lenguaje y para poder saber si todo esto es verdad se va a trabajar con él y hacer un aplicativo de las misma forma que se hace con la tecnología Java.
    [Show full text]
  • Waitress Documentation Release 2.0.0
    waitress Documentation Release 2.0.0 Pylons Project Developers September 09, 2021 Contents 1 Extended Documentation 3 2 Change History 21 3 Next Release 23 4 2.0.0 (2021-03-07) 25 5 1.4.4 (2020-06-01) 27 6 1.4.3 (2020-02-02) 29 7 1.4.2 (2020-01-02) 31 8 1.4.1 (2019-12-24) 33 9 1.4.0 (2019-12-20) 35 10 1.3.1 (2019-08-27) 37 11 1.3.0 (2019-04-22) 39 12 1.2.1 (2019-01-25) 41 13 1.2.0 (2019-01-15) 43 14 1.2.0b3 (2019-01-07) 45 15 1.2.0b2 (2019-02-02) 47 16 1.2.0b1 (2018-12-31) 49 17 1.1.0 (2017-10-10) 51 18 1.0.2 (2017-02-04) 53 19 1.0.1 (2016-10-22) 55 20 1.0.0 (2016-08-31) 57 i 21 0.9.0 (2016-04-15) 59 22 0.8.10 (2015-09-02) 61 23 0.8.9 (2014-05-16) 63 24 0.8.8 (2013-11-30) 65 25 0.8.7 (2013-08-29) 67 26 0.8.6 (2013-08-12) 69 27 0.8.5 (2013-05-27) 71 28 0.8.4 (2013-05-24) 73 29 0.8.3 (2013-04-28) 75 30 0.8.2 (2012-11-14) 77 31 0.8.1 (2012-02-13) 79 32 0.8 (2012-01-31) 81 33 0.7 (2012-01-11) 83 34 0.6.1 (2012-01-08) 85 35 0.6 (2012-01-07) 87 36 0.5 (2012-01-03) 89 37 0.4 (2012-01-02) 91 38 0.3 (2012-01-02) 93 39 0.2 (2011-12-31) 95 40 0.1 (2011-12-30) 97 41 Known Issues 99 42 Support and Development 101 43 Why? 103 Python Module Index 105 Index 107 ii waitress Documentation, Release 2.0.0 Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance.
    [Show full text]
  • Api Deployment
    API INDUSTRY GUIDE: API DEPLOYMENT JANUARY 2016 BY KIN LANE, THE API EVANGELIST This report is intended to be a field guide to the fast- changing world of API deployment, providing you an overview of companies, tooling, common building blocks, and some of the latest news from across the landscape. AN OVERVIEW OF API DEPLOYMENT There are as many approaches to API deployment as there are types of APIs. The why and how of API deployment varies widely, and until recently, deployment was a topic of conversation left to developers and IT groups. With the latest wave of growth in the world of web APIs, I’ve seen a more active conversation around how we deploy APIs both on-premises and in the cloud. The history of API deployment has its roots in IT, as well as amongst web and mobile developers. Teams either deployed an API using a proxy or gateway (common for IT-led projects), or built their own from scratch, or—more likely—used an open source API framework for scaffolding (common in developer-led projects). Each of these approaches has its benefits, but some organizations or projects may not have the resources to cover the cost of a proper gateway, or to develop their own custom API, resulting in a wave of cloud and open source solutions which support the rapid deployment of APIs from databases, spreadsheets, and other sources. The goal of this research guide is to help businesses be more aware of the high-level concepts surrounding API deployment before making an investment in tools or services.
    [Show full text]
  • The Preparatory Survey Report for Hurmen Wind Power Project in Mongolia (PPP Infrastructure Project) (Public Version)
    Mongolia The Preparatory Survey Report for Hurmen Wind Power Project in Mongolia (PPP Infrastructure Project) (Public Version) November 2015 Japan International Cooperation Agency (JICA) SB Energy, Mizuho Bank, Mizuho Research Institute and Mitsubishi Hitachi Power Systems Engineering OS JR(先) 15-103 < CONTENTS > 1. NEED FOR THE PROJECT AND BACKGROUND ............................................................ 1 1.1 ECONOMIC AND SOCIAL BACKGROUND IN MONGOLIA ........................................................ 1 1.1.1 Summary ................................................................................................................. 1 1.1.2 Politics ..................................................................................................................... 3 1.1.3 Economic situation ................................................................................................... 6 1.1.4 Social and economic situation in the project area ................................................. 16 1.2 STATUS OF MONGOLIAN POWER SECTOR AND CHALLENGES ............................................ 18 1.2.1 Brief overview ........................................................................................................ 18 1.2.2 Organizations of Mongolian power sector ............................................................. 18 1.2.3 Regional energy system ........................................................................................ 20 1.2.4 Power generation ..................................................................................................
    [Show full text]
  • Python Web Frameworks
    Python Web Frameworks Carlos de la Guardia Python Web Frameworks Carlos de la Guardia Beijing Boston Farnham Sebastopol Tokyo Python Web Frameworks by Carlos de la Guardia Copyright © 2016 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or [email protected]. Editor: Allyson MacDonald Proofreader: Charles Roumeliotis Production Editor: Shiny Kalapurakkel Interior Designer: David Futato Copyeditor: Gillian McGarvey Cover Designer: Karen Montgomery February 2016: First Edition Revision History for the First Edition 2016-02-12: First Release The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Python Web Frameworks, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limi‐ tation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsi‐ bility to ensure that your use thereof complies with such licenses and/or rights.
    [Show full text]