semvec/pypi-packages huggingface dataset:
shitgram 0.1.dev6
Python module based on https://core.telegram.org/bots/api
Requires Python: ~=3.6
Keywords: bots,bot-api,telegram


# Install :
```commandline
pip install shitgram==0.1.dev6
```

# How to use?
- Config your bot :
---
```python
from shitgram import Bot, types

API_TOKEN = "API_TOKEN_HERE"

bot = Bot(API_TOKEN)
```

- Add handlers to recive updates from telegram:
---
- Any update from telegram:
```python
@bot.onUpdate
async def on_updates(bot: Bot, update: types.Update):
    print(update)
```

- message and edited_message:
```python
@bot.onMessage()
async def on_message(bot: Bot, message: types.Message):
    print(message)

@bot.onEditedMessage()
async def on_edited_message(bot: Bot, message: types.Message):
    print(message)

# Custom filter
def filter_admin(message: types.Message):
    admins = [123456789, 987654321]
    return bool(message.from_user.id in admins)

@bot.onMessage(func=filter_admin)
@bot.onEditedMessage(func=filter_admin)
async def on_custom_filter(bot: Bot, message: types.Message):
    print(message)

# Echo Bot
@bot.onMessage(func=lambda m: m.text)
async def echo(bot: Bot, message: types.Message):
    return await bot.sendMessage(
        message.chat.id,
        message.text,
        entities=message.entities
    )
```

- Callback Queries ~~( No CallbackQuery Methods currently )~~
```python
@bot.onCallbackQuery()
async def on_callback_query(bot: Bot, callback_query: types.CallbackQuery):
    return await bot.sendMessage(
        callback_query.message.chat.id,
        callback_query.data
    )
```

- Inline Queries ( No InlineQuery Methods currently )
```python
@bot.onInlineQuery()
async def on_inline_query(bot: Bot, inline_query: types.InlineQuery):
    print(inline_query)
```

- Start the bot:
---
```python
import asyncio
import logging

logging.basicConfig(level=logging.INFO)

asyncio.run(bot.start_polling())

# add allowed updates:
asyncio.run(bot.start_polling(allowed_updates=["message"]))
```

- Start multiple bots:
---
```python
import asyncio
import logging

from shitgram import run_multiple_bots, Bot, types, enums

logging.basicConfig(level=logging.INFO)

bot_1 = Bot("API_TOKEN_1")
bot_2 = Bot("API_TOKEN_2")

@bot_1.onMessage()
@bot_2.onMessage()
async  def on_message(bot: Bot, message: types.Message):
    return await bot.sendMessage(
        message.chat.id,
        (await bot.getMe()).mention.markdown,
        parse_mode=enums.ParseMode.MARKDOWN
    )

asyncio.run(run_multiple_bots([bot_1, bot_2]))
```

# LICENSE :
- [MIT](https://github.com/x72x/shitgram/blob/master/LICENSE)
prd-algorithms 0.1b0
Opta-Predict Algorithms Hub is a Python 3.8 library designed to empower healthcare professionals with advanced data analysis, forecasting, and statistical modeling tools, enhancing the Opta-Predict ecosystem.
Requires Python: >=3.8,<4.0

# Opta-Predict Algorithms Hub 🚀

![Python version](https://img.shields.io/badge/python-3.8-blue.svg)

## 🌟 Overview

The Opta-Predict Algorithms Library is a specialized Python 3.8-based project crafted to enhance the capabilities of the Opta-Predict software. This library serves as a valuable resource, providing tools for advanced data analysis, forecasting, and statistical modeling. It plays a critical role in supporting the development of microservices like "wrapper-algorithm" within the Opta-Predict ecosystem.

## 🧮 Features

### Patient Visits Forecasting

Predict patient visits to Emergency Departments (ED) with precision. Our library leverages historical data and cutting-edge forecasting techniques to assist healthcare professionals in resource allocation and capacity planning.

### Efficient Patient Distribution

Optimize patient care management by efficiently distributing hospitalized patients to different departments within a medical facility. Our algorithms ensure resource utilization is at its best.

### Statistical Powerhouse

Unlock a suite of statistical tools and functions for deep data analysis and insightful reporting. From basic descriptive statistics to advanced analytics, our library empowers you to extract valuable insights from healthcare data.

## 🏗️ Library Structure

The Opta-Predict Algorithms Library is designed as a Python library, featuring function implementations and utility classes. Seamless integration into your Opta-Predict software projects, powered by Python 3.8, enhances healthcare data analysis and decision-making.

## 🚀 Getting Started

### Installation

1. Clone the repository:

   ```sh
   git clone https://gitlab.opta-lp.com/predict/algorithms.git
   cd predict
   ```
   
2. Create a virtual environment with ![Python version](https://img.shields.io/badge/python-3.8-blue.svg)

3. Configure Poetry, the modern Python dependency manager 📦

    ```sh
    poetry config http-basic.opta-pypi-simple <username> <password>
    poetry install
   ```
### 🔄 Updating Dependencies

To update dependencies:

1. Add the library to pyproject.toml
2. Run these commands

````sh
poetry lock
poetry install
````

When running poetry install, it will install dependencies from poetry.lock if it exists. The poetry lock command updates the existing poetry.lock file.