semvec/pypi-packages huggingface dataset:
mailstream 0.1.6
Async IMAP client for streaming email messages
Requires Python: >=3.8

# Mailstream

## Overview

MailStream is an asynchronous IMAP email client built with `aioimaplib`. It supports streaming emails, polling for updates, and broadcasting new emails to listeners.

## Features

- Asynchronous IMAP connection
- Fetch unseen emails
- Broadcast new emails to subscribers
- Easily integrate with context management

## Installation

```bash
pip install mailstream
```

## Quick Start

```python
import asyncio
from mailstream import MailStreamClient, Config

async def process_email(mail):
    print(f"New email from: {mail.from_email}")
    print(f"Subject: {mail.subject}")

config = Config(
    host="imap.example.com",
    port=993,
    email="your_email@example.com",
    password="your_password",
    debug=True
)

async def main():
    client = MailStreamClient(config)
    await client.connect()

    # Start wait_for_updates in the background
    asyncio.create_task(client.wait_for_updates())

    # Subscribe to new emails
    listener = client.subscribe()
    
    # Process emails from listener
    while True:
        mail = await listener.get()
        await process_email(mail)

    # Close connection
    await client.close()

asyncio.run(main())
```

## Configuration Options

- `host`: IMAP server hostname (required)
- `email`: Login email (required)
- `password`: Login password (required)
- `port`: IMAP server port (default: 993)
- `mailbox`: Target mailbox (default: 'INBOX')
- `debug`: Enable debug mode (default: False)

## Advanced Usage

### Fetching Unseen Mails

```python
# Retrieve all unseen emails
unseen_mails = client.get_unseen_mails()
for mail in unseen_mails:
    print(mail.subject)
```

### Multiple Listeners

```python
async def listener1(mail):
    print("Listener 1 received:", mail.subject)

async def listener2(mail):
    print("Listener 2 received:", mail.subject)

listener1_queue = client.subscribe()
listener2_queue = client.subscribe()
```

### Waiting for New Emails

```python
await client.wait_for_updates()
```

## Examples
For more examples, including advanced usage, please see the [examples](examples) directory.

## Error Handling

```python
from mailstream import ConnectionError, AuthenticationError

try:
    client = MailStreamClient(
        host='imap.example.com',
        port=993,
        email='your_email@example.com',
        password='your_password',
        debug=True
    )
    await client.connect()
except (ConnectionError, AuthenticationError) as e:
    print(f"Connection failed: {e}")
```

## Contributing

Contributions are welcome! Please see our [contributing guidelines](docs/development.md) for more details.

## License

[MIT](LICENSE)

## Support

For issues, please open a GitHub issue in the repository.
uv2conda 1.0.1
Create a Conda environment file from a Python project using uv.
Requires Python: >=3.9

# uv2conda

![PyPI](https://img.shields.io/pypi/v/uv2conda)

Tiny Python package to create a [`conda`](https://docs.anaconda.com/miniconda/) environment file from a Python project using [`uv`](https://docs.astral.sh/uv/).

Assuming you have installed `uv`:

```shell
uvx uv2conda \
    --project-dir "/path/to/my/project/" \
    --name "my_conda_env_name" \
    --python "3.12.7" \
    --conda-env-file "my_conda_env.yaml" \
    --requirements-file "requirements.txt" \
    --uv-args "--prerelease=allow"
```

Or, in Python:

```python
from uv2conda import CondaEnvironment

environment = CondaEnvironment.from_project_dir(
    project_dir="/path/to/my/project/",
    name="my_conda_env_name",
    python_version="3.12.7",
    uv_args=["--prerelease=allow"],
)
environment.to_pip_requirements_file("requirements.txt")
environment.to_yaml("environment.yaml")
```

Example for this library:

```console
$ uv2conda --python 3.12.7
```

```yaml
name: uv2conda
dependencies:
  - python=3.12.7
  - pip
  - pip:
      - click==8.1.7
      - colorama==0.4.6 ; sys_platform == 'win32' or platform_system == 'Windows'
      - loguru==0.7.2
      - markdown-it-py==3.0.0
      - mdurl==0.1.2
      - packaging==24.2
      - pygments==2.18.0
      - pyyaml==6.0.2
      - rich==13.9.4
      - shellingham==1.5.4
      - typer==0.15.1
      - typing-extensions==4.12.2
      - win32-setctime==1.1.0 ; sys_platform == 'win32'
```

## Related projects

- [`pyproject2conda`](https://pypi.org/project/pyproject2conda/)
tamal 0.2.0
A library for wrapping text
Requires Python: <4.0,>=3.12

This is a python library for breaking and wrapping text.

The library provides three functions, `wrap`, `chunk`, and `break_lines`.

`chunk` breaks a string once, using whitespace, existing hyphens or soft
hyphens, or by forcing a hyphen at a given maximum width, returning the head and
the tail (as a `tuple[str, str]`, with the second slot of the tuple potentially
being an empty string).

`break_lines` breaks a string into lines of a given maximum width, returning
the resulting lines as a `list[str]`.

`wrap` wraps a text.


# Install

    pip install tamal


# Documentation

See [jnthnhrrr.github.io/python-tamal](https://jnthnhrrr.github.io/python-tamal)
smsactivatepy 1
smsactivatepy is an Python module that provides functions for working with the API sms-activate.org
Requires Python: >=3.6

# SMSActivatePy Library

A Python library for interacting with the [SMSActivate API](https://sms-activate.org/api2). This tool allows you to integrate SMS activation services seamlessly into your projects.

## Installation

To install the library, run the following command:

```sh
pip install smsactivatepy
```

## Requirements

- `requests`
- `json`

## Usage Example

```python
from smsactivatepy.api import SMSActivateAPI

# Initialize the API with your key
sa = SMSActivateAPI(APIKEY)

# Enable debug mode (optional, for troubleshooting)
sa.debug_mode = True
```

## Features

This library provides an interface for accessing the SMSActivate service. You can use it for operations such as:
- Requesting a virtual phone number
- Managing SMS activations
- Checking account balance

Detailed functionality is described in the official [SMSActivate API documentation](https://sms-activate.org/api2).

## Author

Developed by Gabriel Lima  
Email: [gabrielmrts@yahoo.com](mailto:gabrielmrts@yahoo.com)