Python Programming Blueprints

How to build useful, real-world applications in the Python programming language
Preview in Mapt

Python Programming Blueprints

Daniel Furtado, Marcus Pennington

How to build useful, real-world applications in the Python programming language
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $39.99
Save 74%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Python Programming Blueprints Book Cover
Python Programming Blueprints
$ 39.99
$ 10.00
Python Web Scraping Cookbook Book Cover
Python Web Scraping Cookbook
$ 31.99
$ 10.00
Buy 2 for $20.00
Save $51.98
Add to Cart

Book Details

ISBN 139781786468161
Paperback456 pages

Book Description

Python is a very powerful, high-level, object-oriented programming language. It's known for its simplicity and huge community support. Python Programming Blueprints will help you build useful, real-world applications using Python.

In this book, we will cover some of the most common tasks that Python developers face on a daily basis, including performance optimization and making web applications more secure. We will familiarize ourselves with the associated software stack and master asynchronous features in Python. We will build a weather application using command-line parsing. We will then move on to create a Spotify remote control where we'll use OAuth and the Spotify Web API. The next project will cover reactive extensions by teaching you how to cast votes on Twitter the Python way. We will also focus on web development by using the famous Django framework to create an online game store. We will then create a web-based messenger using the new Nameko microservice framework. We will cover topics like authenticating users and, storing messages in Redis.

By the end of the book, you will have gained hands-on experience in coding with Python.

Table of Contents

Chapter 1: Implementing the Weather Application
Setting up the environment
Core functionality
Getting the user's input with ArgumentParser
Creating the parser
Summary
Chapter 2: Creating a Remote-Control Application with Spotify
Setting up the environment
Creating a Spotify app
The application's configuration
Authenticating with Spotify's web API
Querying Spotify's web API
Creating the player
Summary
Chapter 3: Casting Votes on Twitter
Setting up the environment
Creating a Twitter application
Adding the configuration file
Performing authentication
Building the Twitter voting application
Summary
Chapter 4: Exchange Rates and the Currency Conversion Tool
Setting up the environment
Creating the API wrapper
Adding the database helper class
Creating the command line parser
Adding the application's entry point
Testing our application
Summary
Chapter 5: Building a Web Messenger with Microservices
TempMessenger Goals
Requirements
What is Nameko?
Creating your first Nameko microservice
Unit-testing a Nameko microservice
Exposing HTTP entrypoints
Integration testing Nameko microservices
Storing messages
Nameko Dependency Providers
Saving messages
Retrieving all messages
Displaying messages in the web browser
Sending messages via POST requests
Expiring messages in Redis
Sorting messages
Browser polling for messages
Summary
Chapter 6: Extending TempMessenger with a User Authentication Microservice
TempMessenger goals
Requirements
Creating a Postgres dependency
Creating users
Securely storing passwords in the database
Authenticating users
Splitting out the services
Creating a Flask server
Web sessions
Prepending the email to our messages
Summary
Chapter 7: Online Video Game Store with Django
Setting up the development environment
Creating a new Django project
Exploring the Django project's structure
Creating the project's main app
Installing client-side dependencies
Adding login and logout views
Creating new users
Creating the game data model
Creating the shopping cart model
Summary
Chapter 8: Ordering Microservices
Setting up the environment
Creating the service models
Creating the model's managers
Learning to test
Creating the order model serializer
Creating the views
Setting up the service URLs
Integration with the game online store
Deploying to AWS
Summary
Chapter 9: Notification Serverless Application
Setting up the environment
Setting up the Amazon Web Services CLI
Configuring a Simple Email Service
Creating an S3 bucket
Implementing the notification service
Deploying the application with Zappa
Restricting access to the API's endpoints
Modifying the order service
Testing all the pieces together
Summary

What You Will Learn

  • Learn object-oriented and functional programming concepts while developing projects
  • The dos and don'ts of storing passwords in a database
  • Develop a fully functional website using the popular Django framework
  • Use the Beautiful Soup library to perform web scrapping
  • Get started with cloud computing by building microservice and serverless applications in AWS
  • Develop scalable and cohesive microservices using the Nameko framework
  • Create service dependencies for Redis and PostgreSQL

Authors

Table of Contents

Chapter 1: Implementing the Weather Application
Setting up the environment
Core functionality
Getting the user's input with ArgumentParser
Creating the parser
Summary
Chapter 2: Creating a Remote-Control Application with Spotify
Setting up the environment
Creating a Spotify app
The application's configuration
Authenticating with Spotify's web API
Querying Spotify's web API
Creating the player
Summary
Chapter 3: Casting Votes on Twitter
Setting up the environment
Creating a Twitter application
Adding the configuration file
Performing authentication
Building the Twitter voting application
Summary
Chapter 4: Exchange Rates and the Currency Conversion Tool
Setting up the environment
Creating the API wrapper
Adding the database helper class
Creating the command line parser
Adding the application's entry point
Testing our application
Summary
Chapter 5: Building a Web Messenger with Microservices
TempMessenger Goals
Requirements
What is Nameko?
Creating your first Nameko microservice
Unit-testing a Nameko microservice
Exposing HTTP entrypoints
Integration testing Nameko microservices
Storing messages
Nameko Dependency Providers
Saving messages
Retrieving all messages
Displaying messages in the web browser
Sending messages via POST requests
Expiring messages in Redis
Sorting messages
Browser polling for messages
Summary
Chapter 6: Extending TempMessenger with a User Authentication Microservice
TempMessenger goals
Requirements
Creating a Postgres dependency
Creating users
Securely storing passwords in the database
Authenticating users
Splitting out the services
Creating a Flask server
Web sessions
Prepending the email to our messages
Summary
Chapter 7: Online Video Game Store with Django
Setting up the development environment
Creating a new Django project
Exploring the Django project's structure
Creating the project's main app
Installing client-side dependencies
Adding login and logout views
Creating new users
Creating the game data model
Creating the shopping cart model
Summary
Chapter 8: Ordering Microservices
Setting up the environment
Creating the service models
Creating the model's managers
Learning to test
Creating the order model serializer
Creating the views
Setting up the service URLs
Integration with the game online store
Deploying to AWS
Summary
Chapter 9: Notification Serverless Application
Setting up the environment
Setting up the Amazon Web Services CLI
Configuring a Simple Email Service
Creating an S3 bucket
Implementing the notification service
Deploying the application with Zappa
Restricting access to the API's endpoints
Modifying the order service
Testing all the pieces together
Summary

Book Details

ISBN 139781786468161
Paperback456 pages
Read More

Read More Reviews

Recommended for You

Python Web Scraping Cookbook Book Cover
Python Web Scraping Cookbook
$ 31.99
$ 10.00
Python Machine Learning - Second Edition Book Cover
Python Machine Learning - Second Edition
$ 31.99
$ 10.00
Building Serverless Applications with Python Book Cover
Building Serverless Applications with Python
$ 39.99
$ 28.00
Modern Python Cookbook Book Cover
Modern Python Cookbook
$ 39.99
$ 28.00
Python GUI Programming Cookbook - Second Edition Book Cover
Python GUI Programming Cookbook - Second Edition
$ 39.99
$ 10.00
Hands-On MQTT Programming with Python Book Cover
Hands-On MQTT Programming with Python
$ 27.99
$ 19.60