Skip to main content

Command Palette

Search for a command to run...

Cool modules of python for beginners

Published
1 min read
A

if i were to choose an api as my life moto i would choose REST

Requests

When it comes to making HTTP requests in Python, the requests module is a game-changer. It provides a simple and elegant API for sending HTTP requests and handling responses. With requests, you can easily fetch data from web APIs, interact with web services, or scrape web pages.

import requests

response = requests.get('https://api.example.com/data')
data = response.json()
print(data)

pyttsx3

pyttsx3 is a text-to-speech conversion library in Python. It allows you to convert text into spoken words. This module is handy for creating applications that require speech output, such as virtual assistants, accessibility tools, or notification systems.

import pyttsx3

engine = pyttsx3.init()
engine.say("Hello, how are you?")
engine.runAndWait()

pywhatkit

pywhatkit is a Python library that provides various utilities, including sending WhatsApp messages, performing Google searches, converting text to handwriting, and more. It simplifies common tasks and enables you to automate interactions with web services.

import pywhatkit

# Send a WhatsApp message
pywhatkit.sendwhatmsg("+1234567890", "Hello from Python!", 15, 0)