The Well-Grounded Python Developer (MEAP v9)

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

When you’re new to Python, it can be tough to understand where and how to use its many language features. There’s a dizzying array of libraries, and it’s challenging to fit everything together. The Well-Grounded Python Developer builds on Python skills you’ve learned in isolation and shows you how to unify them into a meaningful whole. As you work through this practical guide, you’ll discover how all the bits of the Python ecosystem connect as you build and modify a typical web server application. about the technology Python is the perfect language for beginning programmers. It is easy to learn, with tons of helpful libraries and tools. Better still, it doesn’t run out of steam when you want to create more advanced applications for web development or Machine Learning. Once you’ve mastered the syntax of simple Python scripts, it can be a challenge to progress to more ambitious projects. This book helps you on that path. about the book The Well-Grounded Python Developer teaches you how to write real software in Python by building on the basic language skills you already have. Veteran developer Doug Farrell helps you see the big picture you can create out of small pieces, introducing concepts like modular construction, APIs, and the design of a basic web server. Throughout the book, you’ll practice your skills by building a blogging platform—the kind of web app that’s in high demand by modern businesses. When you’re finished, you’ll have gone from having a basic understanding of Python's syntax, grammar, and libraries to using them as the tools of a professional software developer.

Author(s): Doug Farrel
Publisher: Manning Publications
Year: 2023

Language: English
Pages: 278

The Well-Grounded Python Developer MEAP V09
Copyright
Welcome
Brief contents
Chapter 1: Becoming a Pythonista
1.1 Commitment to learning
1.2 Reaching goals
1.2.1 Thinking like a developer
1.2.2 Building applications
1.3 Using Python
1.3.1 Programming paradigms
1.3.2 Creating maintainable code
1.3.3 Performance
1.3.4 The language community
1.3.5 Developer tooling
1.4 Python version to use
1.5 Closing thoughts
1.6 Summary
Chapter 2: That’s a good name
2.1 Names
2.1.1 Naming things
2.1.2 Naming experiment
2.2 Namespaces
2.3 Python namespaces
2.3.1 Builtins level
2.3.2 Module level
2.3.3 Function level
2.3.4 Namespace scope
2.3.5 Namespace experiment
2.4 Summary
Chapter 3: The API, let's talk
3.1 Starting a conversation
3.1.1 A contract between pieces of code
3.1.2 What's passed as input
3.1.3 What's expected as output
3.2 Function API
3.2.1 Naming
3.2.2 Parameters
3.2.3 Return value
3.2.4 Single responsibility
3.2.5 Function length
3.2.6 Idempotence
3.2.7 Side-effects
3.3 Documentation
3.4 Closing thoughts
3.5 Summary
Chapter 4: The object of conversation
4.1 Object-oriented programming
4.1.1 Class definition
4.1.2 Drawing with class
4.1.3 Inheritance
4.1.4 Polymorphism
4.1.5 Composition
4.2 Closing thoughts
4.3 Summary
Chapter 5: Exceptional events
5.1 Exceptions
5.2 Handling exceptions
5.2.1 Handle an exception if the code can do something about it
5.2.2 Allow exceptions to flow upward in your programs
5.2.3 Informing the user
5.2.4 Never silence an exception
5.3 Raising an exception
5.4 Creating your own exceptions
5.5 Closing thoughts
5.6 Summary
Chapter 6: Sharing with the internet
6.1 Sharing your work
6.1.1 Web application advantages
6.1.2 Web application challenges
6.2 Servers
6.2.1 Request - response model
6.3 Web servers
6.4 Flask
6.4.1 Why Flask
6.4.2 Your first web server
6.4.3 Serving content
6.4.4 More jinja2 features
6.5 Running the web server
6.5.1 Gunicorn
6.5.2 Commercial hosting
6.6 Closing thoughts
6.7 Summary
Chapter 7: Doing it with style
7.1 Application styling
7.1.1 Creating appealing styles
7.1.2 Styling consistency
7.1.3 Normalizing styles
7.1.4 Responsive design
7.2 Integrating bootstrap
7.2.1 Previous example now with bootstrap
7.3 Helping MyBlog grow
7.3.1 The Flask app instance
7.4 Namespaces
7.4.1 Flask blueprints
7.4.2 Add blueprints to MyBlog
7.4.3 Create the about page
7.4.4 Refactored app instance
7.5 Navigation
7.5.1 Creating navigation information
7.5.2 Displaying navigation information
7.5.3 MyBlog's current look
7.6 Application configuration
7.6.1 Configuration files
7.6.2 Private information
7.7 Flask debug toolbar
7.7.1 FlaskDynaConf
7.8 Logging information
7.8.1 Configuration
7.9 Adding a favicon
7.10 Closing thoughts
7.11 Summary
Chapter 8: Do I know you? Authentication
8.1 The HTTP protocol is stateless
8.1.1 Sessions
8.2 Remembering someone
8.2.1 Authentication
8.2.2 Logging in
8.3 News flash
8.3.1 Improving the login form
8.4 Making new friends
8.4.1 New user form
8.4.2 Oh yeah, logging out
8.4.3 What's next
8.5 Summary
Chapter 9: What can you do? Authorization
9.1 Login/logout navigation
9.2 Confirming new friends
9.2.1 Sending email
9.3 Resetting passwords
9.4 User profiles
9.5 Security
9.5.1 Protecting routes
9.6 User authorization roles
9.6.1 Creating the roles
9.6.2 Authorizing routes
9.7 Protecting forms
9.8 Closing thoughts
9.9 Summary
Chapter 10: Persistence is good: databases
10.1 The other half
10.1.1 Maintaining information over time
10.2 Accessing data
10.3 Database systems
10.3.1 Tables
10.3.2 Relationships
10.3.3 Transaction database
10.3.4 Structured query language: SQL
10.4 SQLite as the database
10.5 SQLAlchemy
10.5.1 Benefits
10.6 Modeling the database
10.6.1 Defining the classes
10.7 Creating and using the database
10.7.1 Adding Data
10.7.2 Using the data
10.8 Closing thoughts
10.9 Summary
Chapter 11: I’ve got something to say
11.1 MyBlog posts
11.1.1 Modeling the database
11.2 Change of direction
11.3 Content blueprint
11.4 Displaying and creating posts
11.4.1 Display handler
11.4.2 Display template
11.5 Creating posts
11.5.1 Creation handler
11.5.2 Creation form
11.5.3 Creation template
11.6 Displaying and editing a post
11.6.1 Display handler
11.6.2 Display template
11.6.3 Update handler
11.6.4 Update form
11.6.5 Update template
11.7 Content to comment hierarchy
11.7.1 Modifying the post class
11.7.2 Display handler
11.7.3 Display template
11.8 Creating comments
11.8.1 Creation template
11.8.2 Creation form
11.8.3 Creation handler
11.9 Notifying users
11.10 Handing site errors
11.11 Closing thoughts
11.12 Summary
Chapter 12: Are we there yet?
12.1 Testing
12.1.1 Unit testing
12.1.2 Functional testing
12.1.3 End-to-end testing
12.1.4 Integration testing
12.1.5 Load testing
12.1.6 Performance testing
12.1.7 Regression testing
12.1.8 Accessibility testing
12.1.9 Acceptance testing
12.2 Debugging
12.2.1 Reproducing bugs
12.2.2 Breakpoints
12.2.3 Logging
12.2.4 Bad results
12.2.5 Process of elimination
12.2.6 Rubber-ducking the problem
12.3 Source control
12.4 Optimization
12.5 OS environments
12.6 Cloud computing
12.7 Containers
12.8 Databases
12.9 Languages
12.10 Networking
12.11 Collaboration
12.12 Closing thoughts
12.13 Summary
Appendix: Your development environment
A.1 Installing Python
A.1.1 Windows
A.1.2 Mac
A.1.3 Linux
A.2 Python Virtual Environment
A.2.1 Windows
A.2.2 Mac and Linux
A.3 Setting up Visual Studio Code
A.3.1 Installing Visual Studio Code
A.3.2 Installing Python Extension
A.3.3 Other Useful Extensions
A.3.4 Starting From the Command Line
A.3.5 Starting a Project
A.4 Some Advice