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.0.tar.gz
.
File metadata
- Download URL: pymailsac-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccf6b9ab777d57ebdbcf756e06b3348ec0da4f2e8011063108658bc677a47119 |
|
MD5 | 0992195868eea11990f856ae49d200e8 |
|
BLAKE2b-256 | c6bd9bc293fba4ae2e48dcded8d3637b733a9550e36a2443a0e0dc864fc8e638 |
File details
Details for the file pymailsac-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pymailsac-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.6 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 272ea17e7d4c07178ddb6faabda744fd9bf00907d5024fd6c8f832122da26b08 |
|
MD5 | dc0d17ada8551f32da95e4a17ef07828 |
|
BLAKE2b-256 | 4eb3decdaa51416a9d8990cc8d134b1f115efc51bfdbb20b80cb1a14a3c34727 |