Python - recommended packages
2024 Oct 14 | 0 min read | tags: python 1 resources 5
- Infrastructure
- python-dotenv - read key-value pairs from .env file and set them as env variables
- nuikta - python compiler to package the application into a single binary. Useful for avoiding pip while building images, or shipping a single executable to users (eg - desktop apps, binaries to deploy via ansible etc)
- Testing
- pytest - Easier to work with. Better testing than unittest (fixtures etc)
- HTTP requests
httpx
(built on top of requests. Brings in async support, http2)requests
- not recommended ashttpx
now exists.
- HTML parsing
selectolax
- generally 20x faster thanbeautifulsoup4
.beautifulsoup4
- simple to use. Has limited parallelism as its HTTP calls are blocking.