Programming Google App Engine with Python. Build and Run Scalable Python Apps on Google's Infrastructure - Helion
ISBN: 978-14-919-0367-4
stron: 464, Format: ebook
Data wydania: 2015-06-29
Księgarnia: Helion
Cena książki: 143,65 zł (poprzednio: 167,03 zł)
Oszczędzasz: 14% (-23,38 zł)
This practical guide shows intermediate and advanced web and mobile app developers how to build highly scalable Python applications in the cloud with Google App Engine. The flagship of Google's Cloud Platform, App Engine hosts your app on infrastructure that grows automatically with your traffic, minimizing up-front costs and accommodating unexpected visitors. You’ll learn hands-on how to perform common development tasks with App Engine services and development tools, including deployment and maintenance.
App Engine's Python support includes a fast Python 2.7 interpreter, the standard library, and a WSGI-based runtime environment. Choose from many popular web application frameworks, including Django and Flask.
- Get a hands-on introduction to App Engine's tools and features, using an example application
- Simulate App Engine on your development machine with tools from Google Cloud SDK
- Structure your app into individually addressable modules, each with its own scaling configuration
- Exploit the power of the scalable Cloud Datastore, using queries, transactions, and data modeling with the ndb library
- Use Cloud SQL for standard relational databases with App Engine applications
- Learn how to deploy, manage, and inspect your application on Google infrastructure
Osoby które kupowały "Programming Google App Engine with Python. Build and Run Scalable Python Apps on Google's Infrastructure", wybierały także:
- GraphQL. Kurs video. Buduj nowoczesne API w Pythonie 169,00 zł, (50,70 zł -70%)
- Receptura na Python. Kurs Video. 54 praktyczne porady dla programist 199,00 zł, (59,70 zł -70%)
- Podstawy Pythona z Minecraftem. Kurs video. Piszemy pierwsze skrypty 149,00 zł, (44,70 zł -70%)
- Twórz gry w Pythonie. Kurs video. Poznaj bibliotekę PyGame 249,00 zł, (74,70 zł -70%)
- Data Science w Pythonie. Kurs video. Algorytmy uczenia maszynowego 199,00 zł, (59,70 zł -70%)
Spis treści
Programming Google App Engine with Python. Build and Run Scalable Python Apps on Google's Infrastructure eBook -- spis treści
- Preface
- A Brief History of App Engine
- Using This Book
- Conventions Used in This Book
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. Introducing Google App Engine
- The Runtime Environment
- The Static File Servers
- Frontend Caches
- Cloud Datastore
- Entities and Properties
- Queries and Indexes
- Transactions
- The Services
- Google Accounts, OpenID, and OAuth
- Google Cloud Endpoints
- Task Queues and Cron Jobs
- Namespaces
- Developer Tools
- The Cloud Console
- Getting Started
- 2. Creating an Application
- Setting Up the Cloud SDK
- Installing Python
- Installing the Cloud SDK
- Authenticating with the Cloud SDK
- Installing the App Engine SDK
- Developing the Application
- The User Preferences Pattern
- A Simple App
- Introducing the webapp Framework
- Templates, Users, and Google Accounts
- Using Python Virtual Environments
- Datastore Models and Web Forms
- The Development Server Console
- Caching with Memcache
- The Python Interactive Console
- Registering the Application
- Uploading the Application
- Testing the App
- Enabling Billing
- Setting Up the Cloud SDK
- 3. Configuring an Application
- The App Engine Architecture
- Configuring a Python App
- Runtime Versions
- App IDs and Versions
- Multithreading
- Request Handlers
- Static Files and Resource Files
- MIME Types
- Cache Expiration
- Domain Names
- Google Apps
- Configuring Secure Connections
- Secure Connections with Custom Domains
- Authorization with Google Accounts
- Environment Variables
- Inbound Services
- Custom Error Responses
- Python Libraries
- Built-in Handlers
- Includes
- 4. Request Handlers and Instances
- The Runtime Environment
- The Sandbox
- Quotas and Limits
- Request limits
- Service limits
- Deployment limits
- Projects
- Versions
- Billable quotas
- The Python Runtime Environment
- The Request Handler Abstraction
- Introducing Instances
- Request Scheduling and Pending Latency
- Warmup Requests
- Resident Instances
- Instance Classes and Utilization
- Instance Hours and Billing
- The Instances Console Panel
- Traffic Splitting
- The Runtime Environment
- 5. Using Modules
- An Example Layout
- Configuring Modules
- Manual and Basic Scaling
- Manual Scaling and Versions
- Startup Requests
- Shutdown Hooks
- Background Threads
- Modules and the Development Server
- Deploying Modules
- Addressing Modules with URLs
- Calling Modules from Other Modules
- Module URLs and Secure Connections
- Module URLs and Custom Domains
- Dispatching Requests to Modules
- Starting and Stopping Modules
- Managing and Deleting Modules and Versions
- The Modules API
- An Always-On Example
- 6. Datastore Entities
- Entities, Keys, and Properties
- Introducing the Python Datastore API
- Property Values
- Strings, Text, and Bytes
- Unset Versus the Null Value
- Multivalued Properties
- Keys and Key Objects
- Using Entities
- Getting Entities Using Keys
- Inspecting Entity Objects
- Saving Entities
- Deleting Entities
- Allocating System IDs
- The Development Server and the Datastore
- 7. Datastore Queries
- Queries and Kinds
- Query Results and Keys
- The Query API
- The Query Class
- AND and OR clauses
- GQL
- Retrieving Results
- Keys-Only Queries
- The Query Class
- Introducing Indexes
- Automatic Indexes and Simple Queries
- All Entities of a Kind
- One Equality Filter
- Greater-Than and Less-Than Filters
- One Sort Order
- Queries on Keys
- Kindless Queries
- Custom Indexes and Complex Queries
- Multiple Sort Orders
- Filters on Multiple Properties
- Multiple Equality Filters
- Not-Equal and IN Filters
- Unset and Nonindexed Properties
- Sort Orders and Value Types
- Queries and Multivalued Properties
- MVPs in Code
- MVPs and Equality Filters
- MVPs and Inequality Filters
- MVPs and Sort Orders
- Exploding Indexes
- Query Cursors
- Projection Queries
- Configuring Indexes
- 8. Datastore Transactions
- Entities and Entity Groups
- Keys, Paths, and Ancestors
- Ancestor Queries
- What Can Happen in a Transaction
- Transactional Reads
- Eventually Consistent Reads
- Transactions in Python
- How Entities Are Updated
- How Entities Are Read
- Batch Updates
- How Indexes Are Updated
- Cross-Group Transactions
- Entities and Entity Groups
- 9. Data Modeling with ndb
- Models and Properties
- Property Declarations
- Property Value Types
- Property Validation
- Nonindexed Properties
- Automatic Values
- Repeated Properties
- Serialized Properties
- Structured Properties
- Computed Properties
- Models and Schema Migration
- Modeling Relationships
- Model Inheritance
- Queries and PolyModels
- Creating Your Own Property Classes
- Validating Property Values
- Marshaling Value Types
- Accepting Arguments
- Implementing Automatic Values
- Automatic Batching
- Automatic Caching
- Setting the Cache Policy for a Kind
- More Complex Cache Policies
- Ignoring Caches per Call
- 10. Datastore Administration
- Inspecting the Datastore
- Managing Indexes
- Accessing Metadata from the App
- Querying Statistics
- Querying Metadata
- Index Status and Queries
- Entity Group Versions
- Remote Controls
- Setting Up the Remote API
- Using the Remote Shell Tool
- Using the Remote API from a Script
- 11. Using Google Cloud SQL with App Engine
- Choosing a Cloud SQL Instance
- Installing MySQL Locally
- Installing the MySQLdb Library
- Creating a Cloud SQL Instance
- Connecting to an Instance from Your Computer
- Setting Up a Database
- Connecting to the Database from App Engine
- Backup and Restore
- Exporting and Importing Data
- The gcloud sql Commands
- 12. The Memory Cache
- Calling Memcache from Python
- Keys and Values
- Setting Values
- Setting Values That Expire
- Adding and Replacing Values
- Getting Values
- Deleting Values
- Locking a Deleted Key
- Atomic Increment and Decrement
- Compare and Set
- Batching Calls to Memcache
- Memcache Administration
- Cache Statistics
- Flushing the Memcache
- 13. Fetching URLs and Web Resources
- Fetching URLs
- Outgoing HTTP Requests
- The URL
- The HTTP Method and Payload
- Request Headers
- HTTP over SSL (HTTPS)
- Request and Response Sizes
- Request Deadlines
- Handling Redirects
- Response Objects
- 14. Sending and Receiving Email Messages
- Sending Email Messages
- Sending Email from the Development Server
- Sender Addresses
- Recipients
- Attachments
- Sending Email
- Receiving Email Messages
- Sending Email Messages
- 15. Sending and Receiving Instant Messages with XMPP
- Inviting a User to Chat
- Sending Chat Messages
- Receiving Chat Messages
- Handling Commands over Chat
- Handling Error Messages
- Managing Presence
- Managing Subscriptions
- Managing Presence Updates
- Probing for Presence
- 16. Task Queues and Scheduled Tasks
- Configuring Task Queues
- Enqueuing a Task
- Task Parameters
- Payloads
- Task Names
- Countdowns and ETAs
- Push Queues
- Task Requests
- Processing Rates and Token Buckets
- Retrying Push Tasks
- Pull Queues
- Enqueuing Tasks to Pull Queues
- Leasing and Deleting Tasks
- Retrying Pull Queue Tasks
- Transactional Task Enqueueing
- Task Chaining
- Task Queue Administration
- Deferring Work
- Scheduled Tasks
- Configuring Scheduled Tasks
- Specifying Schedules
- 17. Optimizing Service Calls
- Calling Services Asynchronously
- Asynchronous Calls in Python
- Datastore
- Memcache
- Blobstore
- URL Fetch
- Using callbacks
- Asynchronous Calls in Python
- Visualizing Calls with AppStats
- Installing AppStats
- Using the AppStats Console
- Calling Services Asynchronously
- 18. The Django Web Application Framework
- Using the Bundled Django Library
- Creating a Django Project
- Hooking It Up to App Engine
- Creating a Django App
- Using Django Templates
- Using ndb with Django
- Using WTForms with ndb
- Using a Newer Version of Django
- Using Django with Google Cloud SQL
- 19. Managing Request Logs
- Writing to the Log
- Viewing Recent Logs
- Downloading Logs
- Logs Retention
- Querying Logs from the App
- Flushing the Log Buffer
- 20. Deploying and Managing Applications
- Uploading an Application
- Using Versions
- Managing Service Configuration
- App Engine Settings
- Managing Developers
- Quotas and Billing
- Getting Help
- Index