semvec/pypi-packages huggingface dataset:
pyawait 0.1.3
Wait until TCP endpoints are open
Requires Python: >=3

# await / pyawait

`await` is a tool that waits until TCP endpoints are open.

It is useful for synchronizing the spin-up of interdependent services, such as linked docker containers.

This is yet another alternative to `wait-for-it.sh`.

## Why?

- extended functionality:
    - ability to wait more than one endpoint at the same time (e.g. `-a host:port -a host:port ...`)
    - ability to set polling interval (e.g. `-i 100ms`)
    - timeout/interval can be provided in different time units (`ns,ms,s,m,h`)
- available as a binary file (size <1mb) without any dependencies
- available via `pip` for convenience

## Installation

Download executable binary:

`sh -c "TARGET=await curl -o $TARGET https://raw.githubusercontent.com/jackcvr/await/main/pyawait/await-$(uname -m) && chmod +x $TARGET"`

or:

`pip install pyawait`

## Usage

```text
Usage: await [-t timeout] [-i interval] [-q] [-v] [-s=false] [-a host:port ...] [command [args]]

  -a value
    	Endpoints to be waiting for, in the form 'host:port'
  -i duration
    	Interval between retries in format N{ns,ms,s,m,h} (default 1s)
  -q	Do not print anything (default false)
  -s	Strict mode: execute command after successful result only (default true)
  -t duration
    	Timeout in format N{ns,ms,s,m,h}, e.g. '5s' == 5 seconds. Zero for no timeout (default 0)
  -v	Verbose mode (default false)
  command args
    	Execute command with arguments after the test finishes (default: if connection succeeded)
```

## Examples

Wait 5 seconds for port 80 on `www.google.com`, and if it is available, echo the message `Google is up`:

```bash
$ await -t 5s -a www.google.com:80 echo "Google is up"
2024/08/23 12:34:32.156464 successfully connected to www.google.com:80
Google is up
```

You can provide few addresses at the same time.

Next command waits 2 seconds for www.google.com:80 and localhost:5000, checking them every 500 milliseconds
with enabled verbose mode and disabled strict mode:
```bash
$ await -t 2s -i 500ms -v -s=false -a www.google.com:80 -a localhost:5000 echo "Printed anyway"
2024/08/23 14:42:03.171442 dial tcp 127.0.0.1:5000: connect: connection refused
2024/08/23 14:42:03.248549 successfully connected to www.google.com:80
2024/08/23 14:42:03.682781 dial tcp 127.0.0.1:5000: connect: connection refused
2024/08/23 14:42:04.183945 dial tcp 127.0.0.1:5000: connect: connection refused
2024/08/23 14:42:04.686111 dial tcp 127.0.0.1:5000: connect: connection refused
2024/08/23 14:42:05.187927 dial tcp: lookup localhost: i/o timeout
timeout error
Printed anyway
```

## License

MIT
dirp 0.0.1
Command-line recursive pretty printer for directories.

# DIRP 

DirP (DIRectory Print) is a command-line utility for pretty printing directories. It generates a nice looking tree representation of its first argument, assuming a valid path. 

For example, running dirp while in the root directory of my [Akashic](https://github.com/prettytrippy/Akashic) project, we see:

```
(base) trippdow@This-Computer Akashic % dirp .
Akashic/
│   Documents/
│   __pycache__/
│   │   └── __init__.cpython-311.pyc
│   │   └── chat.cpython-310.pyc
│   │   └── chat.cpython-311.pyc
│   │   └── chatbots.cpython-310.pyc
│   │   └── chatbots.cpython-311.pyc
│   │   └── chunkers.cpython-311.pyc
│   │   └── embedders.cpython-311.pyc
│   │   └── file_io.cpython-311.pyc
│   │   └── retrieval.cpython-311.pyc
│   │   └── text_utilities.cpython-311.pyc
│   templates/
│   │   └── chat.html
│   │   └── collections.html
│   │   └── index.html
│   └── .env
│   └── .gitignore
│   └── README.md
│   └── __init__.py
│   └── app.py
│   └── architect.py
│   └── chat.py
│   └── chatbots.py
│   └── chunkers.py
│   └── collections.txt
│   └── embedders.py
│   └── file_io.py
│   └── llama_chat_format.py
│   └── playground.py
│   └── retrieval.py
│   └── text_utilities.py
│   └── webscraper.py
```

This output is useful for communicating directory structures to others over text, or prompting a chatbot assistant.

## Setup

#### From Github:

```git clone https://github.com/prettytrippy/dirp```

Edit your ```~/.bashrc```, ```~/.zshrc``` or other to say:
```alias dirp = "path/to/dir_print.py"```

#### From PyPI

```pip install dirp```

## Usage

```dirp path/to/directory/to/print```

## License

MIT License, see LICENSE.
aiogram-router-manage 0.1.3
Library to manage aiogram routers more easily.
Requires Python: >=3.7

# aiogram-router-manage

Library to manage aiogram routers more easily.

## Installation

```bash
pip install aiogram-router-manage


from my_aiogram_library.router_manager import RouterManager
from aiogram import Dispatcher, Bot

# Инициализируем бот и диспетчер
bot = Bot(token="YOUR_BOT_TOKEN")
dp = Dispatcher()

# Инициализируем менеджер роутеров
router_manager = RouterManager(root_path="bot")

# Собираем все роутеры и добавляем их в Dispatcher
for router in router_manager.collect_routers():
    dp.include_router(router)

# Запуск бота
if __name__ == "__main__":
    dp.start_polling(bot)

#usage
from aiogram_router_manage import RouterManager

router_manager = RouterManager(root_path="bot")
routers = router_manager.collect_routers()