Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
suryavaddiraju committed Nov 9, 2023
2 parents 39150f3 + 87889f9 commit 1016f89
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
69 changes: 69 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# sesparser

**sesparser** is a simple, yet elegant, Email parsing library received through AWS SES.

```python
>>> import sesparser
>>> s = sesparser.online('s3_ses_event')
>>> s.recipient
someone@example.com
>>> s = sesparser.online('s3_ses_event',dynamodb=True,table_name="core-mail-data-1")
{'UnprocessedItems': {}, 'ConsumedCapacity': [{'TableName': 'core-mail-data-1', 'CapacityUnits': 20.0}], 'ResponseMetadata': {'RequestId': 'H7210I9JBDH33CKJH1JO16QSEFVV4KQNSO5AEMVJF66Q9ASUAAJG', 'HTTPStatusCode': 200, 'HTTPHeaders': {'server': 'Server', 'date': 'Thu, 09 Nov 2023 03:20:55 GMT', 'content-type': 'application/x-amz-json-1.0', 'content-length': '98', 'connection': 'keep-alive', 'x-amzn-requestid': 'H7210I9JBDH33CKJH1JO16QSEFVV4KQNSO5AEMVJF66Q9ASUAAJG', 'x-amz-crc32': '2598397897'}, 'RetryAttempts': 0}}
>>> s.archive.s3.key
'<DS0PR02MB924561B21196B9EE08B3B93BC2AFA@DS0PR02MB9245.namprd02.prod.outlook.com>'
>>> s.timestamp
20231109233614
>>> print(s)
{"all_email_keys":"all_email_key_values"}
```

sesparser allows you to work on lambda extremely easily. There’s no need to manually add query strings to your function, or to decode your `eml` data — but nowadays, just use the `SNS-Event` method!

sesparser is one of the most downloaded Python packages today, pulling in around `30 downloads / week`— according to GitHub

[![Downloads](https://img.shields.io/badge/Downloads-200-blue.svg)](https://pepy.tech/project/sesparser)
[![Supported Versions](https://img.shields.io/badge/suported%20versions-Python%203.5%20above-blue.svg)](https://pypi.org/project/sesparser)
[![Contributors](https://img.shields.io/github/contributors/psf/requests.svg)](https://github.com/suryavaddiraju/sesparser/graphs/contributors)

## Installing sesparser and Supported Versions

sesparser is available on PyPI:

```console
$ python -m pip install sesparser
```

sesparser officially supports Python 3.7+.

## Supported Features & Best–Practices

sesparser is ready for the demands of building robust and reliable email parsing applications, for the needs of today.

- Handling inline attachments
- File placeholders
- cloud saving
- Data decoding
- Advanced multipart handler
- Different domains handler
- Handle offline too
- Extra layer detection of filenames
- Added support for AWS Lambda Layer
- Advanced Security Details
- Spam recognition
- DKIM,DMARC,SPF and other standard compliance
- Segregating on user recipient mail id
- Bulk processing

## API Reference and User Guide available on [Read the Docs](https://sesparser.readthedocs.io)

[![Read the Docs](https://raw.githubusercontent.com/suryavaddiraju/sesparser/main/ext/ss.png)](https://sesparser.readthedocs.io)

## Cloning the repository

```shell
git clone -c fetch.fsck.badTimezone=ignore https://github.com/suryavaddiraju/sesparser.git
```

---

[![SURYA VADDIRAJU](https://raw.githubusercontent.com/suryavaddiraju/sesparser/main/ext/kr.png)](https://surya.vaddiraju.in) [![Python Software Foundation](https://raw.githubusercontent.com/suryavaddiraju/sesparser/main/ext/psf.png)](https://www.python.org/psf)
56 changes: 56 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build]
ignore-vcs = true

[project]
name = "sesparser"
dynamic = ["version"]
authors = [
{ name="Vaddiraju Surya Teja", email="[email protected]" },
]
description = "AWS SES Email Parser"
readme = "README.md"
requires-python = ">=3.8"
license = "Apache-2.0"
keywords = [
"AWS",
"SES",
"aws ses",
"ses parser",
"email",
"email parser",
"parser",
"lambda",
"layer",
"lambda layer",
"dynamodb",
"email body",
"attachments",
"inline attachments",
"body",
"inline",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = [
"boto3>=1.28.74",
"chardet>=5.2.0",
"pytz>=2023.3",
]

[tool.hatch.version]
path = "src/sesparser/__version__.py"

[tool.hatch.build.targets.wheel]
packages = ["src/sesparser"]

[project.urls]
"Homepage" = "https://github.com/suryavaddiraju/sesparser"
"Bug Tracker" = "https://github.com/suryavaddiraju/sesparser/issues"
Documentation = "https://sesparser.readthedocs.io"

0 comments on commit 1016f89

Please sign in to comment.