Metadata-Version: 2.3
Name: barid
Version: 0.2.0
Summary: A deeply abstract, fully asynchronous Python client for the Barid temporary email API with complex architecture and type-heavy design.
License: MIT
Author: Hexa
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: email-validator
Requires-Dist: httpx[http2]
Requires-Dist: pydantic
Description-Content-Type: text/markdown

# Barid Client

**Barid** is a fully asynchronous, highly modular, and type-driven Python client for interacting with the [barid.site](https://web.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

```python
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

