
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
The mepost-sdk
is a Python library designed to simplify interactions with the Mepost API. It provides convenient methods to send and manage messages efficiently. This SDK is ideal for developers looking to integrate Mepost messaging capabilities into their Python applications.
Install mepost-sdk
using pip:
pip install mepost-sdk
Here is a quick example to get you started:
from mepost import MepostClient
# Create an instance of MepostClient with your API key
client = MepostClient('your_api_key_here')
# Send an email
email_data = {
"from_email": "info@example.com",
"from_name": "Example Company",
"html": "This is a test email sent from the Mepost Python SDK.",
"subject": "Example Subject",
"to": [
{ "email": "recipient1@example.com" },
{ "email": "recipient2@example.com" }
]
}
response = client.send_email(email_data)
print(response)
MepostClient(api_key)
Initializes and returns a new instance of MepostClient.
api_key
: Your Mepost API key.add_domain(request: AddDomainRequest)
Adds a domain to the Mepost account.
request
: An object containing the domain to add.get_domain_list()
Retrieves a list of domains associated with the Mepost account.
remove_domain(request: RemoveDomainRequest)
Removes a domain from the Mepost account.
request
: An object containing the domain to remove.list_groups(limit: int = 10, page: int = 1)
Retrieves a list of email groups.
limit
: The maximum number of groups to return (default: 10).page
: The page number for pagination (default: 1).create_group(request: CreateNewGroupRequest)
Creates a new email group.
request
: An object containing the details of the new group.delete_group(group_id: str)
Deletes an email group.
group_id
: The ID of the group to delete.get_group_by_id(group_id: str)
Retrieves information about a specific email group.
group_id
: The ID of the group to retrieve.update_group(group_id: str, request: RenameGroupRequest)
Updates the name of an email group.
group_id
: The ID of the group to update.request
: An object containing the new group name.list_subscribers(group_id: str, limit: int = 10, page: int = 1)
Retrieves a list of subscribers in a group.
group_id
: The ID of the group.limit
: The maximum number of subscribers to return (default: 10).page
: The page number for pagination (default: 1).add_subscriber(group_id: str, request: CreateSubscriberRequest)
Adds a subscriber to a group.
group_id
: The ID of the group.request
: An object containing subscriber details.delete_subscriber(group_id: str, request: DeleteSubscriberRequest)
Deletes a subscriber from a group.
group_id
: The ID of the group.request
: An object containing the emails of subscribers to delete.get_subscriber_by_email(group_id: str, email: str)
Retrieves subscriber details by email.
group_id
: The ID of the group.email
: The email address of the subscriber.get_message_info(schedule_id: str, email: str)
Retrieves information about a specific scheduled message.
schedule_id
: The ID of the scheduled message.email
: The email address to which the message was sent.cancel_scheduled_message(request: CancelScheduledMessageRequest)
Cancels a scheduled message.
request
: An object containing the scheduled message ID.send_marketing(request: SendMarketingRequest)
Sends a marketing email.
request
: An object for sending marketing emails.send_message_by_template(request: SendMessageByTemplateRequest)
Sends an email using a template.
request
: An object containing the message details and template ID.get_schedule_info(schedule_id: str)
Retrieves schedule information for a specific scheduled message.
schedule_id
: The ID of the scheduled message.send_transactional(request: SendTransactionalRequest)
Sends a transactional email.
request
: An object for sending transactional emails.send_transactional_by_template(request: SendMessageByTemplateRequest)
Sends a transactional email using a template.
request
: An object containing the message details and template ID.create_ip_group(request: CreateIpGroupRequest)
Creates a new IP group.
request
: An object containing the IP group details.get_ip_group_info(name: str)
Retrieves information about a specific IP group.
name
: The name of the IP group.list_ip_groups()
Retrieves a list of all IP groups.
cancel_warmup(request: CancelWarmUpRequest)
Cancels a warmup process for an IP address.
request
: An object containing the IP address.get_ip_info(ip: str)
Retrieves information about a specific IP address.
ip
: The IP address to retrieve.list_ips()
Retrieves a list of all IP addresses.
set_ip_group(request: SetIpGroupRequest)
Assigns an IP address to a specific IP group.
request
: An object containing the IP address and group details.start_warmup(request: StartWarmUpRequest)
Starts a warmup process for an IP address.
request
: An object containing the IP address.Contributions are always welcome! Please read the contributing guide for ways to contribute to this project.
mepost-sdk
is released under the MIT License. See the LICENSE file for more details.
FAQs
A Python SDK for interacting with the Mepost API.
We found that mepost-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.