Skip to product information
Do it! Jump to Python Library Examples
Do it! Jump to Python Library Examples
Description
Book Introduction
The sequel to "Do it! Jump to Python" is out now!
A practical guide to learning Python libraries with various examples!


This book is Park Eung-yong's answer to the questions he's received from countless readers: "What should I study now?" and "What can I do with Python?"
One of the biggest advantages of Python is that it already has a vast library of tools for a wide range of fields.
But if you don't know what libraries are available, you can't use them properly.
In other words, the more knowledge you have about Python libraries, the more freely you can use Python.
This book aims to be the compass you need as you navigate the vast sea of ​​Python.

We've carefully selected 122 Python libraries frequently used in practice to help you study efficiently.
Each library has examples with stories to help you learn when and how to use it.
As you gain experience solving problems one by one, you will discover for yourself what you can do with Python and what you want to do with it.
  • You can preview some of the book's contents.
    Preview

index
Before reading this book

01 Handling Text

How to shorten a string 001? ― textwrap.shorten
002 How to wrap a long sentence? ― textwrap.wrap
003 How to protect personal information with regular expressions? ― re

02 Handling Binary Data

How to output data created in C? ― struct

03 Handling various data

005 How to calculate the date and find the day of the week? ― datetime.date
006 How to find the difference between two dates? - datetime.timedelta
007 How to know which year has 29 days in February? ― calendar.isleap
008 How to insert and remove data from the front and back? ― collections.deque
009 How to name data? ― collections.namedtuple
010 How to count the number of words used? ― collections.Counter
011 How to initialize a dictionary all at once? ― collections.defaultdict
How to select three winners? ― heapq
013 How to print data in a nice way? ― pprint
How to calculate grades based on 014 scores? ― bisect
015 How to name numbers and use them? ― enum
016 How to find the order of courses to take? ― graphlib.TopologicalSorter

04 Handling Math and Numbers

017 How to divide cookies equally? ― math.gcd
How do I know when buses 018 will arrive at the same time? ― math.lcm
019 How to calculate decimal points accurately? ― decimal.Decimal
020 How to calculate fractions accurately? ― fractions
How to pick Lotto numbers 021? ― random
022 How do I know the mean and median of test results? ― statistics
023 How to assign counselors in order? ― itertools.cycle

05 Handling Functional Programming

024 How to calculate annual sales? ― itertools.accumulate
025 How to group data by key value? ― itertools.groupby
026 How to fill in the missing pieces? ― itertools.zip_longest
027 How to draw cards while considering the order? ― itertools.permutations
How to find all the possible numbers for the 028 lottery? - itertools.combinations
029 How to sort coordinates in order? ― functools.cmp_to_key
030 How to temporarily save a web page? ― functools.lru_cache
031 How to create a new function from an existing function? ― functools.partial
How to reduce a value to a single value using a function? ― functools.reduce
033 How to preserve wrapper function properties? ― functools.wraps
034 How to sort by various criteria? ― operator.itemgetter
035 How to handle file paths as objects? ― pathlib

06 Handling Files and Directories

036 How to know the structure of a directory? ― os.path
037 How to read multiple files at once? ― fileinput
038 How to compare directories and files? ― filecmp
039 How to use a temporarily created file? ― tempfile
How to find file 040? ― glob
041 How to find only specific files? ― fnmatch
How to get just one random line from a file? ― linecache
043 How to copy or move a file? ― shutil
044 How to save and load objects to files? ― pickle

07 Storing and Managing Data

045 How to prevent errors due to object changes? ― copyreg
046 How to save a dictionary to a file? ― shelve
047 How to save blog data? ― sqlite3

08 Compress and archive data

048 How to reduce the data size for transmission? ― zlib
049 How to compress data and save it as a file? ― gzip
050 How to compress with the bzip2 algorithm? ― bz2
051 How to compress with the LZMA algorithm? ― lzma
052 How to merge multiple files into a zip file? ― zipfile
053 How to combine multiple files into a tar file? ― tarfile

09 Handling various file formats

054 How to read and write CSV files? ― csv
055 How to read information from a configuration file? ― configparser

10 Handling Ciphertext

056 How to encrypt and store passwords? ― hashlib
057 How to check for message tampering? ― hmac
058 How to generate secure random numbers? ― secrets

11 Handling the Operating System

059 How to treat a string like a file? ― io.StringIO
How to run with command line options specified? ― argparse
061 How to leave a log for debugging? ― logging
062 How to hide the password you entered? ― getpass
063 How to create a terminal program? ― curses
064 How to find out system information? ― platform
065 How to use a library written in C? ― ctypes

12 Run simultaneously

066 How to process in parallel using threads? ― threading
067 How to process in parallel using multiprocessing? - multiprocessing
068 How to process tasks in parallel? ― concurrent.futures
069 How to execute system commands? ― subprocess
070 How to run a task at a desired time? ― sched

13 Handling Network and Interprocess Communication

071 How to program asynchronously? ― asyncio
072 How to make a game that communicates with a server? - socket
073 How to communicate with a server using SSL? ― ssl
074 How to allow multiple people to connect at the same time? ― select
075 How to upgrade a multiplayer game server? ― selectors
076 How to process user-sent signals? ― signal

14 Sending and receiving data over the Internet

077 How to handle JSON data? ― json
078 How to convert binary data to a string? ― base64
How to convert a string to hexadecimal? ― binascii
080 How to encode only non-ASCII characters? ― quopri
081 How to convert a binary file to a text file? ― uu

15 Handling Markup Languages

082 How to prevent XSS attacks? ― html
083 How to extract only the text you want from a web page? ― html.parser
084 How to create an XML document? ― xml.etree.ElementTree
085 How to read elements and content from XML? ― xml.etree.ElementTree

16 Handling Internet Protocols

086 How to run a web browser? ― webbrowser
087 How to create a program that runs on a server? ― cgi
088 How to check for errors in CGI programs immediately? ― cgitb
089 How to create a web server application? ― wsgiref
090 How to save a web page? ― urllib
091 Another way to save a web page? ― http.client
092 How to use a file server? ― ftplib
093 How to check received emails via POP3? - poplib
094 How to check received emails via IMAP4? - imaplib
095 Want to check the latest news? ― nntplib
096 How to attach a file to an email? — smtplib
097 How to connect to Telnet and work? ― telnetlib
098 How to create a unique identifier? ― uuid
How to create a game that communicates with a 099 server? ― socketserver
How to create an HTTP server for testing ― http.server
101 How to create an XMLRPC server and client? ― xmlrpc

17 Handling other services

How to check if it's a 102 image? ― imghdr
103 How to draw with turtle graphics? ― turtle
104 How to create a familiar command-line program? ― cmd
How to analyze sentence 105? ― shlex
106 How to create a graphical user interface? ― tkinter
107 How to test the code you wrote? ― unittest
How to add and test docstrings? ― doctest
How to compare the execution times of 109 functions? ― timeit
How to debug the code you created? ― pdb
How to execute by passing parameters ― sys.argv
How to print or compare 112 objects? ― dataclasses
113 How do I make sure to implement a method? ― abc
114 How to execute a specific task when the program exits? ― atexit
115 How do I find the location and cause of an error? ― traceback
116 How to check the type of data? ― typing

18 Handling External Libraries

How to install and manage packages? ― pip
How to test HTTP methods? ― requests
How to check the changed part of the 119 string? ― diff_match_patch
How to generate test data for 120? ― faker
121 How to solve equations with Python? - sympy
122 How to distribute as an executable file (exe)? ― pyinstaller

Appendix - Five Background Knowledge for Understanding Python Libraries

01 Python and Unicode
02 Closures and Decorators
03 Iterators and Generators
04 Python Type Annotations
05 str() and repr() functions

Search

Detailed image
Detailed Image 1

Publisher's Review
All the Python libraries frequently used in practice are here!
122 Essential Python Libraries!


This book teaches you how to use Python libraries that every Python developer must know.
Chapters 1 through 17 cover the Python standard library, and Chapter 18 explores external libraries that are just as useful as the standard library.
Old and unused libraries were boldly excluded.
Among the 122 libraries, the more important ones are marked as ‘Important’.
If you are a beginner who has just finished learning the basics of Python, let's start by studying the more important Python libraries.

No more reading complicated official documents!
Learn only the key points with examples.


This book will also be helpful to working Python developers.
Nine out of ten developers who have worked on a Python project have probably gotten sick of reading the official Python library documentation and turned it off.
Because the official library documentation is really unfriendly.
This book avoids unnecessary explanations from the official documentation and provides only the core information needed to use the library, along with examples.
Because this book is a guide, not a reference book.

In this situation, you can use this library!
Learn when and how to use it with examples that tell a story.


The best way to learn how to use a Python library is to experience a situation where you need to use it in a real project.
However, this method is time-consuming and inefficient because it does not allow studying all the required libraries at once.

In this book, whenever a Python library is explained, an example that tells a story of how to use that library is provided.
Let's learn when and how to use the library by solving examples.
After reading all 122 stories, you'll be able to immediately remember which libraries to use when faced with similar situations in the future.

A bonus that will take your Python grammar skills to the next level!
'5 Python Background Knowledge' appendix provided!


Because the text was structured to focus on how to actually use Python libraries, any content that was not covered in detail was grouped separately at the end of the text as '5 Background Knowledge for Understanding Python Libraries.'
If you have any questions or feel a bit stuck while solving the examples, it may be due to a lack of background knowledge, so please refer to this appendix.
If you are new to Python, reading the appendix before solving the examples is also a good study method.

Come to the 'Do it! Study Room' where we learn, share, and grow together.

If you plan and study alone, you will quickly become tired.
Let's meet readers who have similar concerns and share difficult content.
Studying while helping each other is more rewarding.
If you want to go far, go with a friend.
- Do it! Study Room: cafe.naver.com/doitstudyroom

The completed source file is available on the Aegis Publishing website's data room or the author's GitHub.

- Easy Publishing website: www.easyspub.co.kr → Click [Data Room] → Search for book title
- Author's GitHub: https://github.com/pahkey/pylib
GOODS SPECIFICS
- Date of issue: May 25, 2022
- Page count, weight, size: 480 pages | 968g | 188*256*19mm
- ISBN13: 9791163033554
- ISBN10: 1163033553

You may also like

카테고리