semvec/pypi-packages huggingface dataset:
dis-uniter 1.4.0
Keep your discord bot alive on replit
Requires Python: >=3.8,<4.0

This creates a simple website to go with your discord.py bot on https://replit.com so it can be kept alive.
# Usage
Run in shell:
```bash
poetry add dis-uniter
```
Store your bot token in a secret called `DISCORD_TOKEN`. Secrets are accessed through the lock icon on the left on desktop, and commands tab at the bottom > secrets on mobile.
```py
from discord.ext import commands
from disuniter import keepAlive
bot = commands.Bot()
# normal bot code here...
keepAlive(bot)
```
Wait, where's the `bot.run`?? The `keepAlive` function does that for you
1) To enforce using a secret to store your token so you don't expose it (NEVER expose it even if you are to remove it instantly, because people can check your repl's history)
2) To restart your bot automatically when there's a rate limit. Rate limits are caused by too many requests from the same IP that is shared across multiple repls, and are responsible for downtimes on replit-hosted bots.

# Why this?
- No dependencies, unlike the typical Flask keep-alive
- No spammy output, unlike Flask and the keep-alive I usually recommended on the replit discord
- Restart your repl when there's a rate limit
- It shows stats about your bot. You can update bot/user info shown by hitting enter. See https://discord-maths-bot.umarismyname.repl.co/
- It automatically adds your repl to https://up.repl.link, a pinger, if it isn't already there
- It uses [Solarized](https://ethanschoonover.com/solarized/#features), which is objectively the best colour palette ever.
# Why is it called dis-uniter?
I am keeping Discord bots alive. Discord = disagreement. I am dis-uniting by keeping disagreements alive.
easygoogletranslate 0.0.4
Easy Google Translate: Unofficial Google Translate API
Requires Python: >=3.5.5

# easygoogletranslate
        
Unofficial Google Translate API. 

This library does not need an api key or something else to use, it's free and simple.
You can either use a string or a file to translate but the text must be equal to or less than 5000 character. 
You can split your text into 5000 characters to translate more.

Google Translate supports 108 different languages. You can use any of them as source and target language in this application.
If source language is not specified, it will detect source language automatically.
This application supports multi thread translation, you can use it to translate multiple languages at once.
Detailed language list can be found here:  https://cloud.google.com/translate/docs/languages

## Installation:
The easiest way to install easygoogletranslateis to download it from PyPI. Then you will be able to use the library.

```
pip install easygoogletranslate
```


## Examples:
1. Specify default source and target language at beginning and use it any time.
```
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate(
    source_language='en',
    target_language='de',
    timeout=10
)
result = translator.translate('This is an example.')

print(result) 
# Output: Dies ist ein Beispiel.
```

2. Don't specify default parameters.
```
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate('This is an example.', target_language='tr')

print(result)
# Output: Bu bir örnektir.
```

3. Override default parameters.
```
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate(target_language='tr')
result = translator.translate('This is an example.', target_language='fr')

print(result)
# Output: Ceci est un exemple.
```

4. Translate a text in multiple languages at once via multi-threading.
```
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate(text='This is an example.', target_language=['tr', 'fr', 'de'])

print(result)
# Output: ['Bu bir örnektir.', 'Ceci est un exemple.', 'Dies ist ein Beispiel.']
```

5. Translate a file in multiple languages at once via multi-threading.
```
from easygoogletranslate import EasyGoogleTranslate

translator = EasyGoogleTranslate()
result = translator.translate_file(file_path='text.txt', target_language=['tr', 'fr', 'de'])

print(result)
# Output: ['Nasılsın?', 'Comment ca va?', 'Wie geht es Ihnen?']
# Text inside file: How are you?
```