Metadata-Version: 2.1
Name: async-typer
Version: 0.1.3
Summary: 
Author: byunjuneseok
Author-email: byunjuneseok@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: typer (>=0.9.0,<0.10.0)
Description-Content-Type: text/markdown

# async-typer

`async-typer` is a simple async wrapper for the [typer](https://github.com/tiangolo/typer) library. 
We already have a lot of async implementations for our applications, but we can't use them easily with typer.
And `async-typer` have more features than typer to solve our real-world problems in a more elegant way.

## Installation

```bash
pip install async-typer
```

## How to use

```python

app = AsyncTyper()

@app.command()
def foo():
    service.work()

@app.async_command()
async def bar():
    await service.work_async()

```


## FastAPI-like event handlers

Handle startup and shutdown events with async or sync functions.

```python
app.add_event_handler("startup", redis_async_pool_manager.init_redis_pool)
app.add_event_handler("shutdown", redis_async_pool_manager.close_redis_pool)
```

