API Wrapper Client for Mailsac
Project description
Mailsac Client Library
This is a Python client library for interacting with the Mailsac REST API. It provides a simple interface to receive, and manage emails using Mailsac's services. See full documentation for the API, here https://mailsac.com/docs/api/#section/About-the-API
Features
- Retrieve messages from your Mailsac inbox.
- Delete messages from your inbox.
Installation
To install the Mailsac client library, you can use pip:
pip install -r requirements.txt
Usage
Here is a basic example of how to use the MailsacClient:
from mailsac.client import MailsacClient
# Initialize the client
client = MailsacClient(api_key='your_api_key')
# Get messages
messages = client.get_messages('your_inbox_id')
# Delete a message
client.delete_message('your_inbox_id', 'message_id')
Client Initialization
sequenceDiagram
participant User
participant MailsacClient
User->>MailsacClient: Initialize with API key
MailsacClient-->>User: Client instance created
Fetching Messages
sequenceDiagram
participant User
participant MailsacClient
participant MailsacAPI
User->>MailsacClient: get_messages(email)
MailsacClient->>MailsacAPI: GET /addresses/{email}/messages
MailsacAPI-->>MailsacClient: JSON response with messages
MailsacClient-->>User: List of EmailMessage instances
Deleting a Message
sequenceDiagram
participant User
participant MailsacClient
participant MailsacAPI
User->>MailsacClient: delete_message(email, message_id)
MailsacClient->>MailsacAPI: DELETE /addresses/{email}/messages/{message_id}
MailsacAPI-->>MailsacClient: Success response
MailsacClient-->>User: True
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bugs.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
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
Built Distribution
File details
Details for the file pymailsac-0.1.1.tar.gz
.
File metadata
- Download URL: pymailsac-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce922f29ed7708c2c00a6c26ad49b7a442822ae946e72d855a06aebb7fc801bd |
|
MD5 | 7b04616b86ad2d15e4aca18af7d6f2a6 |
|
BLAKE2b-256 | bec04bb4ceb200cc841df51b3930037f4e64b856cae743235970f92cec48a7a2 |
Provenance
The following attestation bundles were made for pymailsac-0.1.1.tar.gz
:
Publisher:
upload-to-pypi.yml
on GSejas/mailsac-pyclient
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pymailsac-0.1.1.tar.gz
- Subject digest:
ce922f29ed7708c2c00a6c26ad49b7a442822ae946e72d855a06aebb7fc801bd
- Sigstore transparency entry: 149434469
- Sigstore integration time:
- Predicate type:
File details
Details for the file pymailsac-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pymailsac-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 348dc96279c769e3196892520817297e51a9240338c6b03f221046d23d0ade2c |
|
MD5 | b6ed9b7acfa1740b7bcc7c7947cd6b27 |
|
BLAKE2b-256 | 3482c8527c836fc93fc947b5f2105921e4f3d67fa1efe8b1746c58e17db83741 |
Provenance
The following attestation bundles were made for pymailsac-0.1.1-py3-none-any.whl
:
Publisher:
upload-to-pypi.yml
on GSejas/mailsac-pyclient
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pymailsac-0.1.1-py3-none-any.whl
- Subject digest:
348dc96279c769e3196892520817297e51a9240338c6b03f221046d23d0ade2c
- Sigstore transparency entry: 149434470
- Sigstore integration time:
- Predicate type: