semvec/pypi-packages huggingface dataset:
timelooper 0.1.2
Timed loops made simple
License: MIT
Requires Python: >=3.8,<4.0
Keywords: asyncio,utility

## Timelooper

[![Build Status](https://app.travis-ci.com/monomonedula/timelooper.svg?branch=master)](https://app.travis-ci.com/monomonedula/timelooper)

I found myself re-implementing the same 
pattern over and over 
when it comes to repeating some task until 
some condition is met OR 
the time is up, so here it is abstracted and generalized into
a neat package. 

Yep, that's 25 lines of code + tests.


Here's a demo use case:
```python
from timelooper import Looped, loop_timed
from datetime import timedelta

# Suppose we are listening to some queue
#   and want to batch the incoming messages.
#   However, we only want to wait for
#   some limited time for a batch 
#   to be formed.


class CollectableBatch(Looped):
    def __init__(self, queue, maxsize):
        self.batch = []
        self._queue = queue
        self._maxsize = maxsize
    
    async def do(self) -> None:
        self.batch.append(await self._queue.get())

    def should_stop(self) -> bool:
        return len(self.batch) == self._maxsize

    
collected = CollectableBatch(queue, maxsize=10)
await loop_timed(collected, timedelta(seconds=30))  

print(collected.batch)  # or whatever

```


### Installation
```shell
pip install timelooper
```
seedphotos 0.1.3
A lib that create image through words
License: MIT
Requires Python: >=3.8,<4.0

# SeedPhotos

<p>A lib that create image through words</p>

## Install:

<p>Use poetry or pip for installation: </p>

    pip install seedphotos

or

    poetry add seedphotos



## How to use:

```python
from seedphotos.photos import *

    photos = Photos(width=300, height=300, filename='image name', seed='word seed', folder='file folder', format='webp or jpg') # Mandatory parameters to generate the image
    photos.getPhotos() # Download image
```

<p>With all parameters satisfied it looks like this: </p>

```python
from seedphotos.photos import *

photos = Photos(width=300, height=300, filename='image', seed='Brazil', folder='/home/barbosa/test/test', format='jpg')
photos.getPhotos()
```