3 options
Learn Python programming : an in-depth introduction to the fundamentals of Python / Fabrizio Romano and Heinrich Kruger.
- Format:
- Book
- Author/Creator:
- Romano, Fabrizio, author.
- Kruger, Heinrich, author.
- Language:
- English
- Subjects (All):
- Python (Computer program language).
- Physical Description:
- 1 online resource (553 pages)
- Edition:
- 3rd edition.
- Place of Publication:
- Birmingham : Packt, 2021.
- Biography/History:
- Romano Fabrizio: Fabrizio Romano was born in Italy in 1975. He holds a master's degree in Computer Science Engineering from the University of Padova. He's been working as a professional software developer since 1999. Fabrizio has been part of Sohonet's Product Team since 2016. In 2020, the Television Academy honored them with an Emmy Award in Engineering Development for advancing remote collaboration. Kruger Heinrich: Heinrich Kruger was born in South Africa in 1981. He holds a master's degree in Computer Science from Utrecht University in the Netherlands. He has been working as a professional software developer since 2014. Heinrich has been working alongside Fabrizio in the Product Team at Sohonet since 2017. In 2020, the Television Academy honored them with an Emmy Award in Engineering Development for advancing remote collaboration.
- Summary:
- This book will help you explore the foundations of Python programming and learn how Python can be used to achieve results.
- Contents:
- Cover
- Copyright
- Contributors
- Table of Contents
- Preface
- Chapter 1: A Gentle Introduction to Python
- A proper introduction
- Enter the Python
- About Python
- Portability
- Coherence
- Developer productivity
- An extensive library
- Software quality
- Software integration
- Satisfaction and enjoyment
- What are the drawbacks?
- Who is using Python today?
- Setting up the environment
- Python 2 versus Python 3
- Installing Python
- Setting up the Python interpreter
- About virtual environments
- Your first virtual environment
- Installing third-party libraries
- Your friend, the console
- How to run a Python program
- Running Python scripts
- Running the Python interactive shell
- Running Python as a service
- Running Python as a GUI application
- How is Python code organized?
- How do we use modules and packages?
- Python's execution model
- Names and namespaces
- Scopes
- Objects and classes
- Guidelines for writing good code
- Python culture
- A note on IDEs
- Summary
- Chapter 2: Built-In Data Types
- Everything is an object
- Mutable or immutable? That is the question
- Numbers
- Integers
- Booleans
- Real numbers
- Complex numbers
- Fractions and decimals
- Immutable sequences
- Strings and bytes
- Encoding and decoding strings
- Indexing and slicing strings
- String formatting
- Tuples
- Mutable sequences
- Lists
- Bytearrays
- Set types
- Mapping types: dictionaries
- Data types
- Dates and times
- The standard library
- Third-party libraries
- The collections module
- namedtuple
- defaultdict
- ChainMap
- Enums
- Final considerations
- Small value caching
- How to choose data structures
- About indexing and slicing
- About names
- Chapter 3: Conditionals and Iteration
- Conditional programming
- A specialized else: elif
- The ternary operator.
- Looping
- The for loop
- Iterating over a range
- Iterating over a sequence
- Iterators and iterables
- Iterating over multiple sequences
- The while loop
- The break and continue statements
- A special else clause
- Assignment expressions
- Statements and expressions
- Using the walrus operator
- A word of warning
- Putting all this together
- A prime generator
- Applying discounts
- A quick peek at the itertools module
- Infinite iterators
- Iterators terminating on the shortest input sequence
- Combinatoric generators
- Chapter 4: Functions, the Building Blocks of Code
- Why use functions?
- Reducing code duplication
- Splitting a complex task
- Hiding implementation details
- Improving readability
- Improving traceability
- Scopes and name resolution
- The global and nonlocal statements
- Input parameters
- Argument-passing
- Assignment to parameter names
- Changing a mutable object
- Passing arguments
- Positional arguments
- Keyword arguments
- Iterable unpacking
- Dictionary unpacking
- Combining argument types
- Defining parameters
- Optional parameters
- Variable positional parameters
- Variable keyword parameters
- Positional-only parameters
- Keyword-only parameters
- Combining input parameters
- More signature examples
- Avoid the trap! Mutable defaults
- Return values
- Returning multiple values
- A few useful tips
- Recursive functions
- Anonymous functions
- Function attributes
- Built-in functions
- Documenting your code
- Importing objects
- Relative imports
- One final example
- Chapter 5: Comprehensions and Generators
- The map, zip, and filter functions
- map
- zip
- filter
- Comprehensions
- Nested comprehensions
- Filtering a comprehension
- Dictionary comprehensions
- Set comprehensions
- Generators
- Generator functions.
- Going beyond next
- The yield from expression
- Generator expressions
- Some performance considerations
- Don't overdo comprehensions and generators
- Name localization
- Generation behavior in built-ins
- One last example
- Chapter 6: OOP, Decorators, and Iterators
- Decorators
- A decorator factory
- Object-oriented programming (OOP)
- The simplest Python class
- Class and object namespaces
- Attribute shadowing
- The self argument
- Initializing an instance
- OOP is about code reuse
- Inheritance and composition
- Accessing a base class
- Multiple inheritance
- Method resolution order
- Class and static methods
- Static methods
- Class methods
- Private methods and name mangling
- The property decorator
- The cached_property decorator
- Operator overloading
- Polymorphism - a brief overview
- Data classes
- Writing a custom iterator
- Chapter 7: Exceptions and Context Managers
- Exceptions
- Raising exceptions
- Defining your own exceptions
- Tracebacks
- Handling exceptions
- Not only for errors
- Context managers
- Class-based context managers
- Generator-based context managers
- Chapter 8: Files and Data Persistence
- Working with files and directories
- Opening files
- Using a context manager to open a file
- Reading and writing to a file
- Reading and writing in binary mode
- Protecting against overwriting an existing file
- Checking for file and directory existence
- Manipulating files and directories
- Manipulating pathnames
- Temporary files and directories
- Directory content
- File and directory compression
- Data interchange formats
- Working with JSON
- Custom encoding/decoding with JSON
- I/O, streams, and requests
- Using an in-memory stream
- Making HTTP requests
- Persisting data on disk
- Serializing data with pickle.
- Saving data with shelve
- Saving data to a database
- Chapter 9: Cryptography and Tokens
- The need for cryptography
- Useful guidelines
- Hashlib
- HMAC
- Secrets
- Random numbers
- Token generation
- Digest comparison
- JSON Web Tokens
- Registered claims
- Time-related claims
- Authentication-related claims
- Using asymmetric (public key) algorithms
- Useful references
- Chapter 10: Testing
- Testing your application
- The anatomy of a test
- Testing guidelines
- Unit testing
- Writing a unit test
- Mock objects and patching
- Assertions
- Testing a CSV generator
- Boundaries and granularity
- Testing the export function
- Test-driven development
- Chapter 11: Debugging and Profiling
- Debugging techniques
- Debugging with print
- Debugging with a custom function
- Using the Python debugger
- Inspecting logs
- Other techniques
- Reading tracebacks
- Where to find information
- Troubleshooting guidelines
- Where to inspect
- Using tests to debug
- Monitoring
- Profiling Python
- When to profile
- Measuring execution time
- Chapter 12: GUIs and Scripting
- First approach: scripting
- The imports
- Parsing arguments
- The business logic
- Second approach: a GUI application
- The layout logic
- Fetching the web page
- Saving the images
- Alerting the user
- How can we improve the application?
- Where do we go from here?
- The turtle module
- wxPython, Kivy, and PyQt
- The principle of least astonishment
- Threading considerations
- Chapter 13: Data Science in Brief
- IPython and Jupyter Notebook
- Using Anaconda
- Starting a Notebook
- Dealing with data
- Setting up the Notebook
- Preparing the data
- Cleaning the data
- Creating the DataFrame.
- Unpacking the campaign name
- Unpacking the user data
- Cleaning everything up
- Saving the DataFrame to a file
- Visualizing the results
- Chapter 14: Introduction to API Development
- What is the Web?
- How does the Web work?
- Response status codes
- Type hinting: An overview
- Why type hinting?
- Type hinting in a nutshell
- APIs: An introduction
- What is an API?
- What is the purpose of an API?
- API protocols
- API data-exchange formats
- The railway API
- Modeling the database
- Main setup and configuration
- Adding settings
- Station endpoints
- Reading data
- Creating data
- Updating data
- Deleting data
- User authentication
- Documenting the API
- Consuming an API
- Calling the API from Django
- Chapter 15: Packaging Python Applications
- The Python Package Index
- The train schedule project
- Packaging with setuptools
- Required files
- pyproject.toml
- License
- README
- Changelog
- setup.cfg
- setup.py
- MANIFEST.in
- Package metadata
- Accessing metadata in your code
- Defining the package contents
- Accessing package data files
- Specifying dependencies
- Entry points
- Building and publishing packages
- Building
- Publishing
- Advice for starting new projects
- Alternative tools
- Further reading
- Why subscribe?
- Packt Page
- Other Books You May Enjoy
- Index.
- Notes:
- Description based on print version record.
- ISBN:
- 9781801815529
- 1801815526
- OCLC:
- 1285170335
- Publisher Number:
- 9781801815093
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.