Skip to main content

A Python Library for simplifying the use of repetitive code in my python projects.

Project description

fastcode

A Python Library for simplifying the use of repetitive code in my Python projects.

Installation

Use the package manager pip to install.

pip install fastcode

Usage

For now, I have two functions there all displayed with their parameters and requirements by using typing Library.

The first one is IMAP, which is used to read emails and download their attachments in a created folder in the download_folder path.

import fastcode

# Read email
imap(imap_port: int,
    imap_server: str,
    email_account: str,
    password: str,
    mailbox: str = 'inbox',
    search_criteria: str = 'ALL',
    download_folder: Optional[str] = None
    ) -> None

The Second one is SMTP, which is used to send emails.

import fastcode

# Send email
smtp(to_emails:List[str], 
         smtp_port:int, 
         smtp_server:str, 
         sender_email:str, 
         sender_password:str, 
         subject:str,
         body:str,
         body_type:str,
         attachments: Optional[Dict[str,str]] = None,
         cc_emails:Optional[List[str]] = []
         ) -> None

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastcode-1.0.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page