Skip to main content

A deeply abstract, fully asynchronous Python client for the Barid temporary email API with complex architecture and type-heavy design.

Project description

Barid Client

Barid is a fully asynchronous, highly modular, and type-driven Python client for interacting with the barid.site temporary email API.
It is designed for developers who require a professional, extensible, and heavily abstracted interface to manage disposable email inboxes programmatically.

Barid is engineered with extreme complexity using deep Python patterns like strict type hints, decorators, layered abstraction, and dynamic data models—offering full control over every operation in a highly structured SDK.


🧪 Example Usage

import asyncio
from barid.client import BaridClient
from barid.types import EmailAddress, EmailId

async def main():
    email = EmailAddress("example@barid.site")

    async with BaridClient() as client:
        domains = await client.get_domains()
        print("Available Domains:", domains)

        total = await client.count_emails(email=email)
        print("Total Emails:", total)

        emails = await client.get_emails(email=email, limit=5)
        print(f"\nFetched {len(emails)} email(s)\n")

        for msg in emails:
            print("Subject:", msg.subject)

            details = await client.get_email(email_id=EmailId(msg.id))
            print(details)
            print("Content:", details.text_content or details.html_content)
            print()

        if emails:
            await client.delete_email(email_id=EmailId(emails[0].id))
            print("Deleted the latest email")

        await client.delete_emails(email=email)
        print("Deleted all emails")

asyncio.run(main())

🤝 Contributing

Contributions are highly welcome. Feel free to open issues or submit pull requests for enhancements, bugs, or design improvements.


🪪 License

MIT © 2025 Hexa

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

barid-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

barid-0.2.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file barid-0.2.0.tar.gz.

File metadata

  • Download URL: barid-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for barid-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e9e83ec1cf5fbca70646c798ab7721b2e81b057fbf91e6a32e9ced2890d7f10a
MD5 3cd1667c8c501f1934d128dc9b448bd8
BLAKE2b-256 2bb99b51e0a06c5f02603ed0ad0e02b262c809f9006ecf261facd4b7ec12f3a4

See more details on using hashes here.

File details

Details for the file barid-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: barid-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for barid-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 884e3f9409316555677cfbf548824cf6af382c8d92f887c74cfdc2f11a218c14
MD5 be4afd886184d60a66459c8cda9afc5b
BLAKE2b-256 89bed7e652c825a7636016afb3583d3a2b7566b9a0a6f965f31b7be34bcdf67a

See more details on using hashes here.

Supported by

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