semvec/pypi-packages huggingface dataset:
pytelecast 0.1.2
A Telegram broadcast utility package with multiple database backends
Requires Python: >=3.8

# 🛰️  pytelecast

A lightweight and plug-and-play **broadcast module** for Python Telegram Bots using `python-telegram-bot` v20+. Developed by **Manji Devs**, this module supports:
- JSON (default)
- SQLite
- MongoDB

> Simple. Powerful. Flexible.


## ✨ Features
- 📣 Broadcast any message (text, media, buttons, hyperlinks)
- 📥 Supports reply-to-message for broadcasting
- 👤 User database with JSON / SQLite / MongoDB backends
- 🧠 Smart message formatting (Markdown & buttons preserved)
- 🛡️ Sudo-only broadcasting
- 📊 Stats report after broadcast


## 🔧 Installation
```bash
pip install pytelecast
```


**Requirements**: Python 3.10+ and python-telegram-bot>=20.6


## 🚀 Quick Start

### 1. Basic Setup (`main.py`)
```python
from telegram.ext import Application
from pytelecast import init_broadcast

app = Application.builder().token("YOUR_BOT_TOKEN").build()

init_broadcast(
    app,
    sudo_users=[123456789],  # required
    db_type="json",          # json (default) | sqlite | mongo
    db_url=None              # optional for mongo: "mongodb+srv://..."
)

app.run_polling()
```

### 2. Broadcasting
1. Reply to any message with:
   ```
   /broadcast
   ```
2. Bot will show a preview with confirmation buttons
3. After confirmation, sends to all users with stats:
   ```
   ✅ Broadcast completed.
   ◇ Total Users: 10
   ◇ Successful: 9
   ◇ Blocked Users: 1
   ◇ Deleted Accounts: 0
   ◇ Unsuccessful: 0
   ```


## 🛠️ Supported DB Backends
| Type   | Configuration |
|--------|---------------|
| JSON   | Default (no config needed) |
| SQLite | `db_type="sqlite"` |
| MongoDB | `db_type="mongo"`, `db_url="mongodb+srv://..."` |


## 📁 Requirements
Core Dependencies:
- `python-telegram-bot>=20.6`

Optional (for MongoDB):
- `pymongo>=4.6.3`


## 🧩 Integration Tips
1. Works seamlessly with existing PTB bots
2. Automatic database structure creation
3. Logs indicate active backend during startup
4. All broadcast attempts are logged with timestamps
5. Supports both polling and webhook setups

## 🌐 Links
- GitHub: [github.com/manjidevs/pytelecast](https://github.com/manjidevs/pytelecast)
- PyPI: [pypi.org/project/pytelecast](https://pypi.org/project/pytelecast)
- Python-Telegram-Bot Docs: [docs.python-telegram-bot.org](https://docs.python-telegram-bot.org)

## 📄 License
MIT License © 2023 Manji Devs
google-ml-edu 0.1.3
Python utilities for colabs and other learning material from the Google Machine Learning Education team.
Requires Python: >=3.8

# `ml-edu`

[![Unittests](https://github.com/google/ml-edu/actions/workflows/pytest_and_autopublish.yml/badge.svg)](https://github.com/google/ml-edu/actions/workflows/pytest_and_autopublish.yml)
[![PyPI version](https://badge.fury.io/py/google-ml-edu.svg)](https://badge.fury.io/py/google-ml-edu)

This repository contains Python utilities for performing machine learning tasks, optimized for use in [Google Colab](https://colab.research.google.com/).
itzam 1.2.0
Python SDK to interact with Itzam's API
Requires Python: <4.0,>=3.10

![PyPI Version](https://img.shields.io/pypi/v/itzam?label=pypi%20package)
![PyPI Downloads](https://img.shields.io/pypi/dm/itzam)
# Itzam python sdk
![itzam logo](https://pbs.twimg.com/profile_banners/1930643525021937664/1749136962/600x200)

## Overview

Itzam Python SDK provides a simple interface to interact with the [Itzam API](https://itz.am) for text generation, thread management, model listing, and run inspection.

## Installation

```bash
pip install itzam
```

## Quick Start

```python
from itzam import Itzam

client = Itzam("your-api-key")
response = client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Hello, Itzam!",
  stream=False
)
print(response.text)
```

## Authentication

You can provide your API key directly or set it as an environment variable:

```bash
export ITZAM_API_KEY=your-api-key
```

Then initialize without arguments:

```python
from itzam import Itzam
client = Itzam()
```

## Features

- **Text Generation**: Generate text using your workflows.
- **Threads**: Create and manage threads for conversations.
- **Models**: List available models and their details.
- **Runs**: Inspect previous runs and their metadata.

## Usage Examples
### See available models
```shell
python3 -m itzam.models
```

### Generate Text

```python
response = client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Write a poem about the sea."
)
print(response.text)
```

### Stream Text Generation

```python
for delta in client.text.generate(
  workflow_slug="your_workflow_slug",
  input="Tell me a story.",
  stream=True
):
  print(delta, end="", flush=True)
```

### List Models

```python
models = client.models.list()
for model in models:
  print(model.name, model.tag)
```

### Create a Thread

```python
thread = client.threads.create(
  workflow_slug="your_workflow_slug",
  name="Support Conversation"
)
print(thread.id)
```

### Get a Run

```python
run = client.runs.get("run_id")
print(run.output)
```

## Advanced

You can specify a custom API base URL if needed:

```python
client = Itzam(api_key="your-api-key", base_url="https://itz.am")
```

## Requirements

- Python 3.10+
- `requests`
- `pydantic`
- `rich`
- `python-dotenv` (optional, for environment variable loading)

## License

MIT

---

For more details, see the [API documentation](https://itz.am).