semvec/pypi-packages huggingface dataset:
async-repeat 0.0.1
A simple async function repeater
Requires Python: >=3.6

#AsyncRepeat
A simple decorator for repeating async functions. The main idea is that a coroutine can only be awaited for one time. In
some special case that an async function needs to be run for multiple times, use this tool for an easy approach

## Get started
First install it with pip:
```bash
pip install async-repeat
```
Then in your program:
```python
import asyncio
from async_repeat import repeat

@repeat(3)
async def foo():
    print("foo")

asyncio.run(foo())
```
The result will be:
```bash
foo
foo
foo
```

The repeat decorator has two modes:

- Concurrent: The function will create tasks and run the tasks at the same time
- Synchronous: The coroutines will run one by one
schema-validator-halpa 0.0.7
A utility to validate JSON schemas with jsonschema with simplejson
Requires Python: >=3.6

# Package

This package is a wrapper for jsonschema and simplejson to simplyfy JSON schema validation specified by [JSON Schema Draft 7](https://json-schema.org/specification-links.html#draft-7) (link to [IETF](https://tools.ietf.org/html/draft-handrews-json-schema-01)).

## Example

```python

from validator import validate

# Define the validation schema
schema = {
    "type": "object",
    "required": [
        "name",
        "age",
    ],
    "properties": {
        "name": { "type": "string" },
        "age": { "type": "number" },
    }
}

# Data to be validated
data = {
    "name": "Daniel",
    "age": 30,
}

# Validate and run
validation = validate(schema, data)
if validation==True:
    # do something with data, e.g. create a new friend
else:
    print(validation) # will show a well formated dict with errors
```

> Note: More examples can be shown in the tests

## Contribute

This package is intended to be used by private projects. But go ahead if you like and make comments and pull requests and I might look into it.

### Install the package

```sh
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

### Run tests

```sh
python -m pytest -m validator -s
```

### Upload package

```sh

# Set your user with python keyring
python3 -m keyring set https://upload.pypi.org/legacy/ $username
# substitue $username with your actual username

# Update packaging tools
python3 -m pip install --user --upgrade setuptools wheel twine

# Remove dist folder
rm -rf dist/*

# Create a new dist
python3 setup.py sdist bdist_wheel
# Above command creates
# dist/
#  schema-validator-halpa-0.0.5-py3-none-any.whl
#  schema-validator-halpa-0.0.5.tar.gz
# where "0.0.1" is equivalent to value in "version" from setup.py

# Upload the package
python3 -m twine upload dist/*

```
geta 0.1.1
geta, for when you need to "get a" random thing
Requires Python: >=3.6

# geta, for when you need to "get a" random thing
A Python CLI app to get a random instance of a _thing_. It's starting out with simply providing random names, but I like the idea of the `geta` being able to get many more _things_.

## Usage

### `geta name`

`geta name` uses the [names package](https://pypi.org/project/names/) to generate random first, last, and full names derived from 1990 US census data.

`geta name` defaults to providing a full name but you can specify first, last, or full.

```
✘ python3 geta/main.py name
Sabrina Fusco

✘ python3 geta/main.py name --full
Kenneth Halligan

✘ python3 geta/main.py name --first
Valentina

✘ python3 geta/main.py name --first
Patrica

✘ python3 geta/main.py name --last
Monzo

✘ python3 geta/main.py name --last
Walker
```