Lesson 10 - Week 10: The Standard Library Flashcards
(14 cards)
dataclass
A module that allows to create value semantic types with fewer keystrokes by providing a decorator that can be used in a class, which will generate all the required boilerplate to have a class with the most common methods.
pathlib
A module that provides a way to represent and interact with filesystem paths.
exists
An operation that checks whether the path exists in the filesystem and whether it is a file or a directory
is_dir
An operation that checks whether the path is a directory.
is_file
An operation that checks whether the path is a file.
iterdir
An operation that returns an iterator with path objects to all the files and directories contained within the path object.
mkdir
An operation that creates a directory in the path indicated by the path object.
glob
A key function of Path objects that allows to specify a set of filenames by using wildcards.
read_text
An operation that returns the content of the file as a Unicode string.
subprocess
A module that allows to start a new process and communicate with it, bringing to Python all the available tools installed on your OS through an easy-to-use API.
counter
A class that allows to count hashable objects.
ChainMap
A structure that allows to combine lookups for multiple mapping objects, usually dictionaries.
partial
A function that allows to adapt existing functions by providing values for some of their arguments.
turtle
A module that allows a user to interact with the cursor and leave a trail as it keeps moving.