src package — AsyncPywhatKit 1.1.0.0 documentation

# src package

## Subpackages

- src.Core package
  - Submodules
  - src.Core.core module
    - `check_connection()`
    - `check_number()`
    - `close_tab()`
    - `find_document()`
    - `find_link()`
    - `find_photo_or_video()`
    - `find_recent_chat()`
    - `findtextbox()`
    - `send_message()`
  - src.Core.exceptions module
    - `CallTimeException`
    - `CountryCodeException`
    - `InternetException`
    - `InvalidPhoneNumber`
    - `UnableToAccessApi`
    - `UnsupportedEmailProvider`
  - src.Core.log module
    - `format_message()`
    - `log_image()`
    - `log_message()`
  - Module contents

## Submodules

## src.ascii_art module

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

  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

  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

  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

  Send an Email

## src.misc module

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

  Gives Information on the Topic

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

  Play a YouTube Video

async src.misc.search(topic: str) → None

  Searches About the Topic on Google

async src.misc.show_history() → None

  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

  Take Screenshot of the Screen

## src.remotekit module

src.remotekit.do_click() → str

src.remotekit.ghasit_mouse() → str

src.remotekit.handle() → str

src.remotekit.scrollerr() → str

src.remotekit.send() → str

src.remotekit.slashN() → str

src.remotekit.start_server(port=8000, print_msg=True)

src.remotekit.startt() → str

src.remotekit.typeit() → str

## src.sc module

src.sc.cancel_shutdown() → None

  Cancels the Scheduled Shutdown

async src.sc.shutdown(time: int = 20) → None

  Schedules a Shutdown after the Specified Time

## src.whats module

async src.whats.main()

  Check the internet connection.

src.whats.open_web() → bool

  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

  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

  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

  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

  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

  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

  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

  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