### Local Development Setup for Airmailer Source: https://github.com/cmalek/airmailer/blob/master/CONTRIBUTING.rst Steps to set up the Airmailer project for local development, including forking, cloning, installing dependencies, creating branches, and running tests. ```shell $ git clone git@github.com:your_name_here/airmailer.git $ mkvirtualenv airmailer $ cd airmailer/ $ python setup.py develop $ git checkout -b name-of-your-bugfix-or-feature $ flake8 airmailer tests $ python setup.py test or pytest $ tox $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature ``` -------------------------------- ### Install Airmailer Source: https://github.com/cmalek/airmailer/blob/master/README.rst This snippet shows how to install the Airmailer package using pip, the standard package installer for Python. ```bash pip install airmailer ``` -------------------------------- ### Local Development Setup Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt Includes dependencies from a local documentation requirements file and the current project directory for development. ```Python -r doc/requirements.txt -e . ``` -------------------------------- ### Airmailer SES Email Sending with Environment Credentials Source: https://github.com/cmalek/airmailer/blob/master/doc/source/index.rst Illustrates sending emails via SES using credentials configured through the environment or AWS metadata, as per Boto3's configuration guide. Requires only the configuration set name. ```python from airmailer.backend import SESEmailBackend backend = SESEmailBackend(configuration_set_name='example') num_sent = backend.send_mail( 'Example Subject', 'Here is my message', 'from@example.com', ['to@destination.com'], html_message='
here is my HTML message
' ) ``` -------------------------------- ### AWS IAM Policy for SES SendRawEmail Source: https://github.com/cmalek/airmailer/blob/master/doc/source/index.rst An example AWS IAM policy granting permission to send raw emails via SES. This policy should be attached to an appropriate IAM role or user. ```javascript { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["ses:SendRawEmail"], "Resource":"*" } ] } ``` -------------------------------- ### Running Airmailer Tests Source: https://github.com/cmalek/airmailer/blob/master/CONTRIBUTING.rst Instructions on how to run the test suite for the Airmailer project using different methods, including setup.py, pytest, and tox for multi-version testing. ```shell python setup.py test pytest tox python -m unittest tests.test_airmailer ``` -------------------------------- ### Deploying Airmailer Source: https://github.com/cmalek/airmailer/blob/master/CONTRIBUTING.rst Steps for maintainers to deploy new versions of the Airmailer project to PyPI, including version bumping and pushing changes. ```shell $ bump2version patch # possible: major / minor / patch $ git push $ git push --tags ``` -------------------------------- ### Airmailer SMTP Email Sending Source: https://github.com/cmalek/airmailer/blob/master/doc/source/index.rst Demonstrates how to send an email using the SMTPEmailBackend class. Requires SMTP server details, username, password, and TLS configuration. ```python from airmailer.backend import SMTPEmailBackend backend = SMTPEmailBackend( 'smtp.example.com', username='example', password='password' use_tls=True ) num_sent = backend.send_mail( 'Example Subject', 'Here is my message', 'from@example.com', ['to@destination.com'], html_message='here is my HTML message
' ) ``` -------------------------------- ### Core Dependencies Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt Essential libraries for the project's core functionality, including command-line interface handling and cloud service integration. ```Python click>=8.0 boto3>=1.17 ``` -------------------------------- ### Development and Linting Tools Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt Utilities for code formatting, style checking, and static analysis to maintain code quality and consistency. ```Python autopep8 doc8 flake8 pylint pycodestyle mypy ``` -------------------------------- ### Testing and Automation Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt Tools for automating testing and ensuring code quality, including test runners and environment management. ```Python tox ``` -------------------------------- ### Packaging Tools Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt Tools required for packaging and distributing the project, such as version management, building wheels, and uploading to package indexes. ```Python bump2version==0.5.11 twine wheel ``` -------------------------------- ### Interactive Development Source: https://github.com/cmalek/airmailer/blob/master/requirements.txt An enhanced interactive Python shell for development and debugging. ```Python ipython>=7.23.0 ``` -------------------------------- ### Airmailer Backend Base API Source: https://github.com/cmalek/airmailer/blob/master/doc/source/api.rst Provides the API documentation for the airmailer.backend.base module, detailing its members and undocumented members. ```APIDOC airmailer.backend.base: Members: Lists all public members of the base backend module. Undocumented Members: Lists all members without docstrings. ``` -------------------------------- ### Airmailer SES Email Sending with Explicit Credentials Source: https://github.com/cmalek/airmailer/blob/master/doc/source/index.rst Shows how to send an email using the SESEmailBackend with explicit AWS access key, secret key, and region. Supports configuration sets for tracking. ```python from airmailer.backend import SESEmailBackend backend = SESEmailBackend( aws_access_key_id="__THE_ACCESS_KEY_ID__", aws_secret_access_key="__THE_SECRET_ACCESS_KEY__", aws_region_name="__THE_REGION_NAME__", configuration_set_name='example' ) num_sent = backend.send_mail( 'Example Subject', 'Here is my message', 'from@example.com', ['to@destination.com'], html_message='here is my HTML message
' ) ``` ```python from airmailer.backend import SESEmailBackend from botocore.config import Config my_config = Config( aws_access_key_id="__THE_ACCESS_KEY_ID__", aws_secret_access_key="__THE_SECRET_ACCESS_KEY__", region_name="__THE_REGION_NAME__", ) backend = SESEmailBackend( aws_config=my_config, configuration_set_name='example' ) ``` -------------------------------- ### Airmailer AWS Backend API Source: https://github.com/cmalek/airmailer/blob/master/doc/source/api.rst Provides the API documentation for the airmailer.backend.aws module, detailing its members and undocumented members. ```APIDOC airmailer.backend.aws: Members: Lists all public members of the AWS backend module. Undocumented Members: Lists all members without docstrings. ``` -------------------------------- ### Airmailer SMTP Backend API Source: https://github.com/cmalek/airmailer/blob/master/doc/source/api.rst Provides the API documentation for the airmailer.backend.smtp module, detailing its members and undocumented members. ```APIDOC airmailer.backend.smtp: Members: Lists all public members of the SMTP backend module. Undocumented Members: Lists all members without docstrings. ``` -------------------------------- ### Airmailer Message Module API Source: https://github.com/cmalek/airmailer/blob/master/doc/source/api.rst Provides the API documentation for the airmailer.message module, detailing its members and undocumented members. ```APIDOC airmailer.message: Members: Lists all public members of the message module. Undocumented Members: Lists all members without docstrings. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.