Skip to main content

No project description provided

Project description

async-typer

async-typer is a simple async wrapper for the 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

pip install async-typer

How to use

app = AsyncTyper()

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

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

FastAPI-like event handlers

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_typer-0.1.2.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

async_typer-0.1.2-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file async_typer-0.1.2.tar.gz.

File metadata

  • Download URL: async_typer-0.1.2.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/22.5.0

File hashes

Hashes for async_typer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fc341f1d18c77531ae5c9ccb917f75dc0b5daa25246a69d714da5aa92e634f20
MD5 87ee5b8037dbb6b7ad1b5bdfe69e947e
BLAKE2b-256 92b77c9446c0669d86a10eb83fd9d3ac5c26e9e417a9f37ade12ddfe99cb877c

See more details on using hashes here.

File details

Details for the file async_typer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: async_typer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/22.5.0

File hashes

Hashes for async_typer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b416e26cf617e6662500695357956171191f52bdcd77b6c77d10bc1c44ef8d50
MD5 83081a73e02d97a489af55079fdd2d80
BLAKE2b-256 fddcd2307e12a60b5e008f377d01dc7edba779927830806396205b9118fab32e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page