A Python library to parse emails
Project description
rococo-email-parser
A Python library to parse emails
Basic Usage
Installation
Install using pip:
pip install rococo-email-parser
Example
import rococo.parsers.email as parser
file_path="sample.eml"
mode="rb"
with open(file_path, mode) as f:
content = f.read()
email = parser.parse(content)
print(f"Email subject: {email.subject}")
Deployment
The process described is a Continuous Integration (CI) and Continuous Deployment (CD) pipeline for a Python package using GitHub Actions. Here's the breakdown:
Development Phase
Developers push their changes directly to the main branch. This branch is likely used for ongoing development work.
Staging/Testing Phase
When the team is ready to test a potential release, they push the code to a staging branch. Once the code is pushed to this branch, GitHub Actions automatically publishes the package to the test PyPi server. The package can then be reviewed and tested by visiting https://test.pypi.org/project/rococo-email-parser/. This step ensures that the package works as expected on the PyPi platform without affecting the live package.
Release/Publish Phase
When the team is satisfied with the testing and wants to release the package to the public, they create and publish a release on the GitHub repository. Following this action, GitHub Actions takes over and automatically publishes the package to the official PyPi server. The package can then be accessed and downloaded by the public at https://pypi.org/project/rococo-email-parser/.
In essence, there are three primary phases:
- Development (main branch)
- Testing (staging branch with test PyPi server)
- Release (triggered by a GitHub release and published to the official PyPi server).
Local Development
To install local Rococo version in other project, upload to your PyPi:
- Run command "python setup.py sdist" to generate tar.gz file that will be uploaded to PyPi
- create ./pypirc file in the root of the directory and add: [pypi] username = token password = THE_TOKEN_PROVIDED_BY_PYPI
- run the command: twine upload --config-file=./.pypirc dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rococo_email_parser-1.0.0.tar.gz.
File metadata
- Download URL: rococo_email_parser-1.0.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b687f68cd9f5ddd73184397f8699a4101e97c3eb12887015c2777bf8ff8c7c0c
|
|
| MD5 |
68e9db3dcbbcf90f5e0b7a5ddbdf5543
|
|
| BLAKE2b-256 |
4d93e9e8ccd50ee91c09e31f31f6ad29061840233410cb0d5c36d335e63c9b99
|
File details
Details for the file rococo_email_parser-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rococo_email_parser-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be29f3b1a66612f6d156a30843248c50dfed731cfcdbdf30544c8b2d0234f62f
|
|
| MD5 |
69aa812a6a3ad90c4f905d4075ab175d
|
|
| BLAKE2b-256 |
23f95577215cd4bac548a9cc78d997ca3fb2d1b4b832932b54de702f0693f72a
|