src package

Subpackages

Submodules

src.ascii_art module

async src.ascii_art.image_to_ascii_art(img_path: str, output_file: Optional[str] = 'pywhatkit_asciiart') str[source]

Convert an Image to ASCII Art

src.handwriting module

async src.handwriting.text_to_handwriting(string: str, save_to: str = 'pywhatkit.png', rgb: tuple = (0, 0, 0)) None[source]

Convert the given String to Handwritten Characters

src.mail module

async src.mail.send_hmail(email_sender: str, password: str, subject: str, html_code: str, email_receiver: str) None[source]

Send an Email with HTML Code

async src.mail.send_mail(email_sender: str, password: str, subject: str, message: Union[str, MIMEText], email_receiver: str) None[source]

Send an Email

src.misc module

async src.misc.info(topic: str, lines: int = 3, return_value: bool = False)[source]

Gives Information on the Topic

async src.misc.playonyt(topic: str, use_api: bool = False, open_video: bool = True) str[source]

Play a YouTube Video

async src.misc.search(topic: str) None[source]

Searches About the Topic on Google

async src.misc.show_history() None[source]

Prints the Log File Generated by the Library

async src.misc.take_screenshot(file_name: str = 'pywhatkit_screenshot', delay: int = 2, show: bool = True) None[source]

Take Screenshot of the Screen

src.remotekit module

src.remotekit.do_click() str[source]
src.remotekit.ghasit_mouse() str[source]
src.remotekit.handle() str[source]
src.remotekit.scrollerr() str[source]
src.remotekit.send() str[source]
src.remotekit.slashN() str[source]
src.remotekit.start_server(port=8000, print_msg=True)[source]
src.remotekit.startt() str[source]
src.remotekit.typeit() str[source]

src.sc module

src.sc.cancel_shutdown() None[source]

Cancels the Scheduled Shutdown

async src.sc.shutdown(time: int = 20) None[source]

Schedules a Shutdown after the Specified Time

src.whats module

async src.whats.main()[source]

Check the internet connection.

src.whats.open_web() bool[source]

Opens WhatsApp Web

async src.whats.sendimg_or_video_immediately(phone_no: str, path: str, wait_time: int = 15, tab_close: bool = False, close_time: int = 3) None[source]

Send an image or video file via WhatsApp instantly.

This function opens a new tab in the default web browser, navigates to the WhatsApp web page, and sends an image or video file to the specified phone number.

Parameters: phone_no: The phone number to send the file to. path: The file path of the image or video file to be sent. wait_time: The time to wait before sending the file (in seconds). tab_close: A flag indicating whether to close the tab after sending the file. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatmsg(phone_no: str = None, message: str = None, time_hour: int = None, time_min: int = None, wait_time: int = 15, tab_close: bool = False, close_time: int = 3) None[source]

Send a WhatsApp message at a certain time.

This function schedules the sending of a WhatsApp message to a specified phone number at a specified time.

Parameters: phone_no: The phone number to send the message to. message: The message to be sent. time_hour: The hour at which to send the message (in 24-hour format). time_min: The minute at which to send the message. wait_time: The time to wait before sending the message (in seconds). tab_close: A flag indicating whether to close the tab after sending the message. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatmsg_instantly(message: str, phone_no: str, wait_time: int = 15, tab_close: bool = True, close_time: int = 3) None[source]

Send a WhatsApp message instantly.

This function opens a new tab in the default web browser, navigates to the WhatsApp web page, and sends a message to the specified phone number.

Parameters: message: The message to be sent. phone_no: The phone number to send the message to. wait_time: The time to wait before sending the message (in seconds). tab_close: A flag indicating whether to close the tab after sending the message. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatmsg_to_group(group_id: str, message: str, time_hour: int, time_min: int, wait_time: int = 15, tab_close: bool = False, close_time: int = 3) None[source]

Send a WhatsApp message to a group at a certain time.

This function schedules the sending of a WhatsApp message to a specified group at a specified time.

Parameters: group_id: The ID of the group to send the message to. message: The message to be sent. time_hour: The hour at which to send the message (in 24-hour format). time_min: The minute at which to send the message. wait_time: The time to wait before sending the message (in seconds). tab_close: A flag indicating whether to close the tab after sending the message. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatmsg_to_group_instantly(group_id: str, message: str, wait_time: int = 15, tab_close: bool = False, close_time: int = 3) None[source]

Send a WhatsApp message to a group instantly.

This function opens the WhatsApp Web page in a new tab and sends a message to the specified group.

Parameters: group_id: The ID of the group to send the message to. message: The message to be sent. wait_time: The time to wait before sending the message (in seconds). tab_close: A flag indicating whether to close the tab after sending the message. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatsdoc_immediately(phone_no: str, path: str, wait_time: int = 15, tab_close: bool = True, close_time: int = 3) None[source]

Send a WhatsApp document instantly.

This function opens a new tab in the default web browser, navigates to the WhatsApp web page, and sends a document to the specified phone number.

Parameters: phone_no: The phone number to send the document to. path: The file path of the document to be sent. wait_time: The time to wait before sending the document (in seconds). tab_close: A flag indicating whether to close the tab after sending the document. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

async src.whats.sendwhatsmsg_to_all(phone_nos: List[str], message: str, time_hour: int, time_min: int, wait_time: int = 15, tab_close: bool = False, close_time: int = 3) None[source]

Send a WhatsApp message to a list of phone numbers at a certain time.

This function schedules the sending of a WhatsApp message to a list of specified phone numbers at a specified time.

Parameters: phone_nos: The list of phone numbers to send the message to. message: The message to be sent. time_hour: The hour at which to send the message (in 24-hour format). time_min: The minute at which to send the message. wait_time: The time to wait before sending the message (in seconds). tab_close: A flag indicating whether to close the tab after sending the message. close_time: The time to wait before closing the tab (in seconds).

Returns: None.

Module contents