Skip to main content

Mail.tm Stack Development Kit, designed to enhance your experience with the renowned temporary email service, mail.tm

Project description

SDK Banner

Mail.tm

Stack Development Kit (Python)
Ruff Passing Package Static Badge

Installation

pip install mailtm-sdk

[!TIP] Without the documentation it is almost worthless to even start to operate with the library, kindly refer to the documentation.

Introduction

Welcome to the Mail.tm Stack Development Kit, designed to enhance your experience with the renowned temporary email service, Mail.tm. Here's why you'll find it indispensable:

  1. Enhanced Integration: This kit streamlines interactions with Mail.tm's API, empowering you to seamlessly integrate its features into your applications. Whether you're automating email workflows or incorporating temporary email capabilities, this SDK has you covered.

  2. Comprehensive Documentation: Methods are constructed using the documentation, available here.

  3. Adherence to Terms: Rest assured, this SDK complies fully with Mail.tm's terms of usage, ensuring a seamless and secure experience for both developers and users. By respecting Mail.tm's conditions, we prioritize the integrity and reliability of the service by this kit.

  4. Assurance of safety This repository prioritizes your safety. With frequent updates to dependencies, we ensure that no vulnerable dependencies compromise your security. Count on us for a secure and reliable experience.

Experience the power and convenience of Mail.tm with our Stack Development Kit – your gateway to efficient and reliable temporary email solutions.

Key Features:

  1. Versatility at its Core: Recognizing the diverse needs of users, we've packed this library to cater to various requirements. Whether you're seeking basic data fetching capabilities or integration with sophisticated bots, we've got you covered with two distinct clients and client-less data fetchers.

    • xclient.AsyncMail: Utilize this client for asynchronous interactions with the API, leveraging a session for seamless communication. Ideal for asynchronous workflows requiring speed and efficiency.

    • client.SyncMail: Opt for this client for synchronous requests to the API, ensuring simplicity and reliability with each interaction. Perfect for synchronous operations demanding consistency.

    • get or xget: Explore these client-less data fetchers and helpers for streamlined operations without the need for session management.

      • xget: Facilitates asynchronous operations, enhancing performance and responsiveness.

      • get: Supports synchronous operations, prioritizing simplicity and ease of use.

  2. Type-Safety:

    We prioritize strict type-checking throughout the entire codebase of the SDK. You can trust that no type-related errors will interrupt your workflow, ensuring a smooth and error-free experience.

  3. Enhanced Speed:

    Unlike traditional data validation libraries or Python's built-in json module, we leverage msgspec for accelerated data delivery within the codebase. Experience faster performance and streamlined data handling.

Stellar Feature:

[!NOTE] This script sets up a pooling-based server that checks the API every second for new events. When a difference is detected, the corresponding event is dispatched, allowing you to respond dynamically to incoming messages.

In addition to the core SDK functionalities, this package offers an additional layer of scripts designed to handle clients in an event-driven manner, reminiscent of frameworks like discord.py or hikari. With this SDK, you gain access to a client that dispatches events seamlessly.

Here's a sample usage scenario:

from mailtm.server.events import NewMessage
from mailtm.core.methods import ServerAuth
from mailtm.server.srv import MailServer

# Initialize MailServer with authentication details
server = MailServer(
    server_auth=ServerAuth(
        account_id="...",  # Your account ID.
        account_token="...",  # Your account token.
    )
)

# Define an event handler for new messages
@server.on_new_message 
async def event(event: NewMessage):
    print(event.new_message.text)

# Start the event loop
server.run()

This would initiate the event-runner which would start to pool, and a server is then initiated.

End

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

mailtm_sdk-0.1.1.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

mailtm_sdk-0.1.1-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file mailtm_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: mailtm_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for mailtm_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d6d2943356e0204830d8fc079dbafde3c77c2ed545f3a8f0eaff3693b837820
MD5 727c1b540af1941185a86a6d2d1d46ce
BLAKE2b-256 9fa2ac4cbade49707b465a901bd91f104f1565822d030cc12140721e3dce3292

See more details on using hashes here.

File details

Details for the file mailtm_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mailtm_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for mailtm_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bb075faffd073089efe20f4530801f7647f858025ea8894de36f7ea5c9ef85a
MD5 e940033a6da0fdbcc78e7a583d40278b
BLAKE2b-256 c94cacdc1efe0a8ad0397bd01deb881c0a4eb892cf85972f4a13ba8fcf2d2941

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page