semvec/pypi-packages huggingface dataset:
MoonlightDB 2.0.2
Moonlight is a lightweight JSON-database for Python.
License: MIT License
Requires Python: >=3.12
Keywords: python, cli, package, json, database, web, interface, async, python3, python3.12, database-management, moonlight

# Moonlight Database
<img src="https://github.com/De4oult/Moonlight/blob/main/Moonlight/sources/Moonlight%20Logo.png?raw=true" alt="Moonlight Logo" height="150" />

<br>

__Moonlight__ is a lightweight _JSON-database_ for _Python_.

### Installing database library
```bash
pip install MoonlightDB
```

### Docs
* [Moonlight CLI Documentation](https://github.com/De4oult/Moonlight/blob/main/Moonlight/sources/moonlight_cli_documentation.md)
* [Moonlight Python Documentation](https://github.com/De4oult/Moonlight/blob/main/Moonlight/sources/moonlight_class_documentation.md)
* [Moonlight API Documentation](https://github.com/De4oult/Moonlight/blob/main/Moonlight/sources/moonlight_api_documentation.md)

## Author
```
     _      _  _               _ _   
  __| | ___| || |   ___  _   _| | |_ 
 / _` |/ _ \ || |_ / _ \| | | | | __|
| (_| |  __/__   _| (_) | |_| | | |_ 
 \__,_|\___|  |_|  \___/ \__,_|_|\__|
```

## __Thank you a lot!__

<br>

## How to reach me
<a href="https://t.me/de4oult">
    <img src="https://img.shields.io/badge/-Telegram-informational?style=for-the-badge&logo=telegram" alt="Telegram Badge" height="30" />
</a>
<img src="https://img.shields.io/badge/-kayra.dist@gmail.com-informational?style=for-the-badge&logo=gmail" alt="Gmail Badge" height="30" />
aiogram-i18n 1.4
small translation tools for aiogram
License: MIT License
Requires Python: >=3.8
Keywords: aiogram, api, asyncio, bot, fluent, framework, gnutext, i18n, telegram, wrapper

# aiogram_i18n

Installation:
```pip install aiogram_i18n```

To use FluentCompileCore:
```pip install fluent_compiler```

To use FluentRuntimeCore:
```pip install fluent.runtime```

```python
import asyncio
from contextlib import suppress
from logging import basicConfig, INFO
from typing import Any

from aiogram import Router, Dispatcher, F, Bot
from aiogram.enums import ParseMode
from aiogram.filters import CommandStart
from aiogram.types import Message

from aiogram_i18n import I18nContext, LazyProxy, I18nMiddleware, LazyFilter
from aiogram_i18n.cores.fluent_runtime_core import FluentRuntimeCore
from aiogram_i18n.types import (
    ReplyKeyboardMarkup, KeyboardButton
    # you should import mutable objects from here if you want to use LazyProxy in them
)

router = Router(name=__name__)
rkb = ReplyKeyboardMarkup(
    keyboard=[
        [KeyboardButton(text=LazyProxy("help"))]  # or L.help()
    ], resize_keyboard=True
)


@router.message(CommandStart())
async def cmd_start(message: Message, i18n: I18nContext) -> Any:
    name = message.from_user.mention_html()
    return message.reply(
        text=i18n.get("hello", user=name),  # or i18n.hello(user=name)
        reply_markup=rkb
    )


@router.message(LazyFilter("help"))  # or LazyProxy("help") or F.text == LazyProxy("help")
async def cmd_help(message: Message) -> Any:
    return message.reply(text="-- " + message.text + " --")


async def main() -> None:
    basicConfig(level=INFO)
    bot = Bot("42:ABC", parse_mode=ParseMode.HTML)
    i18n_middleware = I18nMiddleware(
        core=FluentRuntimeCore(
            path="locales/{locale}/LC_MESSAGES"
        )
    )

    dp = Dispatcher()
    dp.include_router(router)
    i18n_middleware.setup(dispatcher=dp)

    await dp.start_polling(bot)


if __name__ == "__main__":
    with suppress(KeyboardInterrupt):
        asyncio.run(main())
```