Importing modules

We briefly touched on importing modules way back in Chapter 1The Fundamentals of Python. Modules are also called libraries or packages. Modules are modular, often self-contained Python programs that are commonly utilized in other programs, hence the need to import them for access.

Modules are used to separate code to make a program easier to work with, as each module can be designed to do one thing well, rather than having to make a single program that is responsible for all logic.

The Python Package Index (PyPI) website (https://pypi.org) is the official repository of third-party Python libraries. At the time of writing, there are more than 150,000 packages available for download from PyPI. Most of these packages are designed to be imported into a Python project to provide additional, or easier, functionality than can be achieved with the default Python libraries.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset