Python Libraries
Python libraries are reusable collections of modules and packages that extend Pythonβs capabilities for a wide range of tasks, from data analysis and web development to machine learning and automation. Libraries help developers avoid reinventing the wheel and accelerate development.
π Popular Python Librariesβ
- NumPy: Fundamental package for numerical computing and arrays.
- Pandas: Data analysis and manipulation, especially with tabular data.
- Matplotlib / Seaborn / Plotly: Data visualization and plotting.
- Requests: Simple HTTP library for making web requests.
- Flask / Django / FastAPI: Web development frameworks.
- BeautifulSoup / Scrapy: Web scraping and parsing HTML/XML.
- SQLAlchemy: Database toolkit and ORM.
- pytest / unittest: Testing frameworks.
- scikit-learn: Machine learning algorithms and tools.
- TensorFlow / PyTorch: Deep learning frameworks.
- OpenCV: Computer vision and image processing.
- Pillow: Image manipulation.
- asyncio / aiohttp: Asynchronous programming and HTTP requests.
π οΈ Example: Installing and Using a Libraryβ
pip install requests
import requests
response = requests.get('https://api.github.com')
print(response.json())
π Useful Linksβ
π Notesβ
- Use
pip
orconda
to install libraries. - Virtual environments (
venv
,virtualenv
,conda
) help manage dependencies. - Many libraries are open source and have active communities.