Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Hands-On Enterprise Application Development with Python
Hands-On Enterprise Application Development with Python

Hands-On Enterprise Application Development with Python: Design data-intensive Application with Python 3

Arrow left icon
Profile Icon Saurabh Badhwar
Arrow right icon
$54.99
Paperback Dec 2018 374 pages 1st Edition
eBook
$29.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Saurabh Badhwar
Arrow right icon
$54.99
Paperback Dec 2018 374 pages 1st Edition
eBook
$29.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$29.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Hands-On Enterprise Application Development with Python

Using Python for Enterprise

Python has been around in the world of programming for more than two decades now, and over the years, the language has seen a number of refinements, a growing community, and a lot of production-ready and well-supported libraries. But is Python ready to make a dent in the world of enterprise application development, which has been long dominated by the likes of C++, Java, and .NET, the so-called enterprise-grade languages?

Over the course of this chapter, we will see how Python has evolved over the years and how it is ready to become a serious competitor in the world of enterprise application development.

This chapter will cover the following topics:

  • Recent developments in Python to enable its growth in enterprise application development
  • The special use cases where Python shines
  • The differences between enterprise and general-purpose software
  • The requirements for developing an enterprise application

Technical requirements

The code listings in this book can be found under chapter01 directory at https://github.com/PacktPublishing/Hands-On-Enterprise-Application-Development-with-Python.

The code samples can be cloned by running the following command:

git clone https://github.com/PacktPublishing/Hands-On-Enterprise-Application-Development-with-Python

The instructions to run the code can be found under the README file in the individual chapter directories.

The code has been tested to run on a system that is running Fedora 28 and Python version 3.6.5, but it should be able to run on any system running Python 3.6.5.

Recent developments in Python

Python is a dynamically typed, interpreted language that was initially well suited for scripting tasks that are boring and repetitive day-to-day tasks. But as the years progressed, the language gained a number of new features and the huge backing of its community, which propelled its development to make it a language that is now well suited to performing tasks that range from very simple applications, such as web scraping, to analyzing large amounts of data for training machine learning models that themselves are written in Python. Let's take a look at some of the major things that have changed over the years and see what the latest release of Python, Python 3, brings to the table.

Dropping backward compatibility

Python as a language has evolved a lot over the years, but despite this fact, a program written in Python 1.0 will still be able to run in Python 2.7, which is a version that was released 19 years after Python 1.0.

Though a great benefit for the developers of Python applications, this backward compatibility of the language is also a major hurdle in the growth and development of major improvements in the language specification, since a great amount of the older code base will break if major changes are made to the language specification.

With the release of Python 3, this chain of backward compatibility was broken. The language in version 3 dropped the support for programs that were written in earlier versions in favor of allowing a larger set of long-overdue improvements to the language. However, this decision disappointed quite a lot of developers in the community.

It's all Unicode

In the days of Python 2, the text data type str was used to support ASCII data, and for Unicode data, the language provided a unicode data type. When someone wanted to deal with a particular encoding, they took a string and encoded it into the required encoding scheme.

Also, the language inherently supported an implicit conversion of the string type to the unicode type. This is shown in the following code snippet:

str1 = 'Hello'
type(str1) # type(str1) => 'str'
str2 = u'World'
type(str2) # type(str2) => 'unicode'
str3 = str1 + str2
type(str3) # type(str3) => 'unicode'

This used to work, because here, Python would implicitly decode the byte string str1 into Unicode using the default encoding and then perform a concatenation. One thing to note here is that if this str1 string contained any non-ASCII characters, then this concatenation would have failed in Python, raising a UnicodeDecodeError.

With the arrival of Python 3, the data types that dealt with text changed. Now, the default data type str which was used to store text supports Unicode. With this, Python 3 also introduced a binary data type, called bytes, which can be used to store binary data. These two types, str and bytes, are incompatible and no implicit conversion between them will happen, and any attempt to do so will give rise to TypeError, as shown in the following code:

str1 = 'I am a unicode string'
type(str1) # type(str1) => 'str'
str2 = b"And I can't be concatenated to a byte string"
type(str2) # type(str2) => 'bytes'
str3 = str1 + str2
-----------------------------------------------------------
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't concat str to bytes

As we can see, an attempt to concatenate a unicode type string with a byte type string failed with TypeError. Although an implicit conversion of a string to a byte or a byte to a string is not possible, we do have methods that allow us to encode a string into a bytes type and decode a bytes type to a string. Look at the following code:

str1 = '₹100'
str1.encode('utf-8')
#b'\xe2\x82\xb9100'
b'\xe2\x82\xb9100'.decode('utf-8')
# '₹100'

This clear distinction between a string type and binary type with restrictions on implicit conversion allows for more robust code and fewer errors. But these changes also mean that any code that used to deal with the handling of Unicode in Python 2 will need to be rewritten in Python 3 because of the backward incompatibility.

Here, you should focus on the encoding and decoding format used to convert string to bytes and vice versa. Choosing a different formatting for encoding and decoding can result in the loss of important information, and can result in corrupt data.

Support for type hinting

Python is a dynamically typed language, and hence the type of a variable is evaluated at runtime by the interpreter once a value has been assigned to the variable, as shown in the following code:

a = 10
type(a) # type(a) => 'int'
a = "Joe"
type(a) # type(a) => 'str'

Though dynamic interpretation of the type of a variable can be handy while writing small programs where the code base can be easily tracked, the feature of the language can also become a big problem when working with very large code bases, which spawn a lot of modules, and where keeping track of the type of a particular variable can become a challenge and silly mistakes related to the use of incompatible types can happen easily. Look at the following code:

def get_name_string(name):
return name['first_name'] + name['last_name']

username = "Joe Cruze"

print(get_name_string(username))

Let's see what happens if we try to execute the preceding program:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in get_name_string
TypeError: string indices must be integers

The program exited with a TypeError because we passed a string type to the get_name_string() method and then tried to access the keys inside a string, which is not the correct solution.

With the release of Python 3.5, the community added support for type hinting that was built into the language. This was not an effort to enforce a method, but was rather provided to support the users who may want to use modules that can catch errors that are related to a variable changing its type in between the execution flow.

The general syntax to mark the type of a variable is as follows:

<variable>: <type> = <value>

To mark the types in a method, the following syntax can be used:

def method_name(parameter: type) -> return_type:
# method body

One of the examples of how to use type hinting in the program code is shown in the following code:

from typing import Dict

def get_name_string(name: Dict[str, str]) -> str:
return name['first_name'] + name['last_name']

username = "Joe Cruze"

print(get_name_string(username))

When the preceding code is written in an IDE, the IDE can use these type hints to mark the possible violations of the type change of variable in the code base, which can prove out to be really handy by helping to avoid errors that are related to an incorrect type change when dealing with large code bases.

An important point that needs to be reiterated here is that using type hinting does not guarantee that the interpreter will raise an error if you pass a parameter with an incorrect type to the method. The type hinting support is not enforceable and should only be used either with other tools that can help check type violations or with IDEs to support the development process. 

Where Python shines

Every language has been developed to solve a certain type of problem that developers face while trying to build software for a specific domain. Python, being a dynamically typed, interpreted language, also has a set of use cases where it excels.

These use cases involve the automation of repetitive and boring tasks, quick prototyping of applications, and small applications focusing on accomplishing a specific goal, such as the installation of software, the setting up of a development environment, performing cleanup, and so on.

But is that all? Is Python good only for doing small tasks? The answer to this is no. Python as a language is much more powerful and can easily accomplish a large amount of increasingly complex tasks, such as running a website that scales to cope with millions of users using it in a very short span of time, processing large sets of incoming files, or training a machine learning model for an image-recognition system.

We are talking about achieving increasingly complex tasks using Python, but isn't Python slow compared to our traditional compile-time languages, such as C++, Java, and .NET? Well, that completely depends upon the context in which a person wants to use Python. If your aim is to run a Python program on an embedded device with only a limited amount of processing power, then yes, Python might be inadequate because of the sheer extra load that its interpreter will have on the processing environment. But if you are planning to use Python to run a web application on decently configured modern hardware, you might never experience any slowdowns while using Python. Rather, you might well feel a bit more productive while using it because of the sheer simplicity of its syntax and the ease of performing operations without writing hundreds of lines to achieve simple tasks.

So, let's see how Python fares in the enterprise environment.

The requirements of enterprise IT

Enterprise IT is complex, and an application that needs to be built for the enterprise will differ a lot from one that is built for a regular consumer. There are several factors that need to be kept in mind before developing an application for enterprise users. Let's take a look at what makes enterprise IT applications different from regular consumer offerings, as shown in the following list:

  • Business oriented: Unlike an application that is built to solve the problems of individual users, an enterprise application is built to meet the specific needs of an organization. This requires the application to conform to the business practices of the organization, their rules, and the workflow they use.
  • Robustness at scale: Most enterprises usually consist of thousands of employees who depend upon the internal applications to work and collaborate with each other. These kinds of use cases generate a large amount of data in various ways, and an application built for enterprise should be robust enough to handle thousands of users at the same time while also being able to crunch through a large amount of data that is distributed over a large network of nodes. During this time, the application should provide adequate mechanisms to deal with unexpected events that may happen for various reasons, such as attempts to breach security, the failure of nodes, power failure, and so on.
  • Long-term support: An enterprise application needs to provide long-term support because enterprises usually don't want to move to newer applications as frequently as a regular consumer does. This happens because most enterprise applications are developed to integrate with the workflow of the organizations, and frequently changing an application will not only increase ownership costs for the enterprise, but will also cause a major disruption in the workflow for the employees of the organization.
  • Ability to integrate: Most of the applications that are built for the enterprise won't be running as standalone applications. They will frequently need to interface with the other applications inside the organization. This gives rise to the need to provide a mechanism for easy integration of the application with others in the organization.

Python in the enterprise ecosystem

Python has been present in the enterprise ecosystem in quite a few forms; be it the automation of boring and repetitive tasks, being used as a glue between two layers of a product, or being used for building quick and easy-to-use clients for big server backends, the language has seen an increasing amount of adoption for various use cases. But what makes Python ready for the development of large enterprise applications? Let's take a look:

  • Ability to build quick prototypes: The syntax of Python is very simple, and a lot of things can be achieved with very few lines of code. This allows developers to quickly develop and iterate over the prototypes of an application. In addition to this, these prototypes do not always need to be thrown away, and if the development is properly planned, they can act as a good base to build the final application upon.

    With the ability to quickly prototype an application, an enterprise software developer can see exactly how the requirements align in the application and how the application is performing. With this information, the stakeholders of the application can more accurately define the path for the application development, thereby avoiding midcycle architectural changes because something didn't work out the way it was expected to.
  • A mature ecosystem: The mature ecosystem is one of the features of Python that deserve a lot of attention. The number of external libraries in Python has been growing at a rapid pace. For most of the tasks that need to be achieved in an application, such as two-factor authentication, testing code, running production web servers, integrating with message buses, and so on, you can easily look for a library with quite decent support.

    This proves to be of great help, since it reduces the amount of code duplication and increases the reusability of the components. With the help of tools such as pip, it is very easy to get the required library added to your project, and with the support of tools such as virtualenv, you can easily segregate a lot of different projects on the same system without creating a dependency mess.

    For example, if someone wants to build a simple web application, they can probably just use Flask, which is a microframework for developing web applications, and go ahead with the development of the web application without having to worry about the underlying complexities of dealing with the sockets, manipulating data on them. All they will require is a few lines of code to get a simple application up and running, as shown in the following code:

from flask import Flask
app = Flask(__name__)

@app.route('/', methods=["GET"])
def hello():
return "Hello, this is a simple Flask application"

if name == '__main__':
app.run(host='127.0.0.1', port=5000)

Now, as soon as someone calls the preceding script, they will have a flask HTTP application up and running. All that remains to be done here is to fire up a browser and navigate to http://localhost:5000. Then we will see Flask serving a web application without any sweat. All of this is made possible in under 10 lines of code.

With a lot of external libraries providing support for a lot of tasks, an enterprise developer can easily enable support for new features in the application without having to write everything from scratch, thereby reducing the chance of possible bugs and non-standardized interfaces creeping into the application. 

  • Community Support: The Python language is not owned by any particular corporate entity, and is completely supported by a huge community backing that decides the future of the standard. This ensures that the language will continue to see support for quite a long time, and won't become obsolete any time soon. This is of great importance to organizations, since they want long-term support for the applications they run.

Given all of the preceding benefits of Python, developer productivity will get a boost when using the language while also reducing the total cost of ownership for the software if decisions are made in a well-planned way. These decisions involve how the application architecture will be laid out and which external libraries to use or to develop in-house. So yes, Python is indeed now ready to be used in the mainstream world of enterprise application development.

Introducing BugZot – a RESTful bug tracker

As we progress through the chapters in this book, we will need some way to implement what we have learned.

Imagine that you work for an organization known as Omega Corporation, which is a market leader for selling software products to companies and individuals. Omega Corporation needs a system through which it can track the bugs in its products. After a lot of brainstorming, they initiate a project codenamed BugZot, which will be their tool to track the bugs in their products.

Let's take a look at what Omega Corporation wants to achieve with project BugZot:

  • Ability for users to report bugs in products: The users, be they internal or external, should be able to file bugs against a particular product of the organization, and while filing these bugs, the users should be able to select the release version of the product they are filing bugs against so as to provide increased granularity.

  • Ability to control who can see the bug details: Since the application allows both internal and external users to file bugs, it is possible that internal users, such as quality engineers or internal IT teams, may file bugs against a product that has not yet been made available to the customers. This will mean that BugZot should be able to hide the details about the bugs that have a confidential status.

  • Providing support for role-based permissions: BugZot should be able to support the concept of roles and permissions so that an unauthorized person cannot change the details of a particular bug. For example, we might not want an external customer to come and change the target release version for a bug, which is a task that should be done by product management.

  • Support for file uploads: When a bug is filed, usually an error report or a log file from the product greatly helps to drill down to the root cause. This will mean that BugZot should be able to deal with file uploads and link the uploaded files to their respective bugs.

  • Search functionality: A person using BugZot should be able to search for the bugs that are filed into the system based upon certain filter criteria, such as the identity of the user who filed the bugs, the current status of the bug, filing bugs against, and so on.

  • Integration with email: When a bug changes state—for example, if a bug is moved from NEW to ASSIGNED—there should be an email notifying the people associated with the bug. This will require BugZot to provide integration with the email service provider of Omega Corporation.

  • Ease of integration: Omega Corporation plans to extend the usage of BugZot at a later time by integrating BugZot with the various other internal applications they have. For this, BugZot should provide an easy way to achieve this integration.

Throughout the course of this book, we will be learning various concepts in Python and applying them to build BugZot, the bug-tracking system for Omega Corporation.

Gathering requirements before development

Gathering the software requirements before starting the development of an enterprise application can be a tedious task, and a failure to do so adequately can have severe consequences, such as increased costs due to delays that are caused by identifying requirements later in the development cycle of the application. Applications that lack the important features to improve the business process workflow will lead users to stop using the application in the worst case.

The requirement-gathering process is complex and tedious, and can take months to complete in an organization. Covering all the steps involved in the process is beyond the scope of this book. This section tries to give a brief description about some of the important steps in the process of gathering software requirements.

Asking for the user requirements

For an application inside an organization, there might be various users who are stakeholders, and can define the requirements of the application. These users can be broadly split into two categories:

  • The workforce: These are the users who usually use the application to achieve a certain set of tasks. They are not concerned with all the features provided by the application, but rather what they focus upon is how well the application fits into their individual workflows. These users can provide requirements specific to what they work on, but may not be able to provide ideas about what they might require in the future, or what the other teams may require.

  • The management: The management consists of people who understand the business process of the organization and have a much broader view of what the application should be able to do. These users may not be able to define the requirements of a particular use case, but can provide requirements considering what the application should do now and what future features might be needed.

Involving both kinds of stakeholders in the requirement-gathering process is important, and something that will define how well the enterprise application meets the demands of its users.

Categorizing the requirements

Once the users have been surveyed for what they would like to have in the application, the next step is to categorize these requirements. Broadly, the requirements can be categorized into two parts:

  • Functional requirements: These are the requirements that define the features and functionality of the application. For example, BugZot has the following functional requirements:

    • Providing functionality for filing bugs by internal and external users
    • Providing support for roles and permissions
    • Providing functionality for dealing with file uploads
    • Integrating with the email system to send emails when a bug changes its status, and much more
  • Nonfunctional requirements: These are those sets of requirements that do not affect the functionality of the software, but rather are implicit or explicit characteristics based on the functional requirements. For example, in BugZot, the following may be defined as some of the nonfunctional requirements:

  • The application should provide security against common web attack vectors, such as XSS and CSRF
  • The operational costs for the application should not exceed N% of the total budget
  • The application should be able to generate backups in case a recovery is needed after a crash

Prioritizing the requirements

Once the requirements are identified and categorized into functional and nonfunctional requirements, they then need to be prioritized according to their importance in the application. If this prioritization is not performed, it will lead to increased costs of development, delayed deadlines, and reduced productivity in the organization. Broadly, we can classify the requirements under the following categories:

  • Must have: These are those requirements that are critical to the success of the application and that must be present in the application when it ships.
  • Should have: These are those requirements that will enhance the functionality of the application but that need some further discussion about whether they should be added to the application.
  • Could have: These are those requirements that are mostly enhancements, and the presence or absence of which won't affect the functionality of the application. These requirements can be taken care of in later updates to the application.
  • Wish list: These are those requirements that are considered features that can be added at some later point in time, but which are not mission critical to the application. These features can be reviewed later for inclusion in the application update cycle.

Generating the software requirement specification document

Once the requirements have been identified, grouped, and prioritized, a document known as the software requirement specification is generated. This document describes the intended purpose, requirements, and nature of the software that needs to be developed.

The software requirement specification (SRS) will describe the following information:

  • The intended purpose of the applications
  • The conventions that are used in the document that are specific to the business process of the organization
  • The features of the application
  • The user classes who will be using the application
  • The environment in which the application will operate
  • The functional and nonfunctional requirements of the application

Once the SRS has been generated, it is sent for review and further negotiations. Once they are successfully completed, the application moves into the design phase, where an application mock-up is devised.

Summary

In this chapter, we briefly covered the changing programming landscape and explored how the Python ecosystem has changed over the years. We looked at how Python, given the fact that it allows quick prototyping, and has a vast array of well-supported libraries and an open community, is quickly rising to become the main choice for the development of large-scale applications in enterprises that require long-term support and easy integration with existing systems. 

We then went on to introduce the demo application, BugZot, that we will be building throughout the course of this book, and defined the functionalities that will be required from the application.

The last section of the chapter covered the requirement-gathering process for developing an enterprise application in a brief, looking at the different stakeholders, such as the hands-on users and the management users, and categorizing the requirements into functional and nonfunctional requirements. We also looked at the importance of prioritizing the requirements.

With the basic knowledge of the environment with which we are going to work on during the course of the book, we are now ready to take a deep dive into the first important aspect of the Enterprise application development which deals with how we layout the code base of our application in production which involves, how a particular set of objects are created and utilized in the application while focusing on the increased re-usability of the modules. The next chapter focuses on this important aspect which is also known as the Design patterns and cover the different types of patterns and how they can be used during the development of your application. 

Questions

  1. Is it possible to perform operations such as concatenation on a str type and a byte type in Python 3?
  2. Is the type hinting support introduced in Python 3 enforcing or not?
  3. Beyond functional and nonfunctional requirements, are there any other kinds of requirements that also might need to be documented into the software requirement specification?
  1. What are the major categories in which the prioritization of requirements can be done?
  2. What are the next steps to take once the software requirement specification document has been generated? 

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore various Python design patterns used for enterprise software development
  • Apply best practices for testing and performance optimization to build stable applications
  • Learn about different attacking strategies used on enterprise applications and how to avoid them

Description

Dynamically typed languages like Python are continuously improving. With the addition of exciting new features and a wide selection of modern libraries and frameworks, Python has emerged as an ideal language for developing enterprise applications. Hands-On Enterprise Application Development with Python will show you how to build effective applications that are stable, secure, and easily scalable. The book is a detailed guide to building an end-to-end enterprise-grade application in Python. You will learn how to effectively implement Python features and design patterns that will positively impact your application lifecycle. The book also covers advanced concurrency techniques that will help you build a RESTful application with an optimized frontend. Given that security and stability are the foundation for an enterprise application, you’ll be trained on effective testing, performance analysis, and security practices, and understand how to embed them in your codebase during the initial phase. You’ll also be guided in how to move on from a monolithic architecture to one that is service oriented, leveraging microservices and serverless deployment techniques. By the end of the book, you will have become proficient at building efficient enterprise applications in Python.

Who is this book for?

If you’re a developer who wants to build enterprise-grade applications, this book is for you. Basic to intermediate-level of programming experience with Python and database systems is required to understand the concepts covered in this book.

What you will learn

  • Understand the purpose of design patterns and their impact on application lifecycle
  • Build applications that can handle large amounts of data-intensive operations
  • Uncover advanced concurrency techniques and discover how to handle a large number of requests in production
  • Optimize frontends to improve the client-side experience of your application
  • Effective testing and performance profiling techniques to detect issues in applications early in the development cycle
  • Build applications with a focus on security
  • Implement large applications as microservices to improve scalability
Estimated delivery fee Deliver to Russia

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 28, 2018
Length: 374 pages
Edition : 1st
Language : English
ISBN-13 : 9781789532364
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Russia

Economy delivery 10 - 13 business days

$6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Dec 28, 2018
Length: 374 pages
Edition : 1st
Language : English
ISBN-13 : 9781789532364
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 152.97
Hands-On Enterprise Application Development with Python
$54.99
Hands-On RESTful Python Web Services
$48.99
Mastering Concurrency in Python
$48.99
Total $ 152.97 Stars icon
Banner background image

Table of Contents

18 Chapters
Using Python for Enterprise Chevron down icon Chevron up icon
Design Patterns – Making a Choice Chevron down icon Chevron up icon
Building for Large-Scale Database Operations Chevron down icon Chevron up icon
Dealing with Concurrency Chevron down icon Chevron up icon
Building for Large-Scale Request Handling Chevron down icon Chevron up icon
Example – Building BugZot Chevron down icon Chevron up icon
Building Optimized Frontends Chevron down icon Chevron up icon
Writing Testable Code Chevron down icon Chevron up icon
Profiling Applications for Performance Chevron down icon Chevron up icon
Securing Your Application Chevron down icon Chevron up icon
Taking the Microservices Approach Chevron down icon Chevron up icon
Testing and Tracing in Microservices Chevron down icon Chevron up icon
Going Serverless Chevron down icon Chevron up icon
Deploying to the Cloud Chevron down icon Chevron up icon
Enterprise Application Integration and its Patterns Chevron down icon Chevron up icon
Microservices and Enterprise Application Integration Chevron down icon Chevron up icon
Assessment Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela