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.1.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

async_typer-0.1.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: async_typer-0.1.1.tar.gz
  • Upload date:
  • Size: 1.5 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.1.tar.gz
Algorithm Hash digest
SHA256 b2421490edd02b97df3714471c3d9b647e783d62d5d542431718e330a76d1801
MD5 0fb7793c8b01e753f9d103597dfa8691
BLAKE2b-256 b02fbaa53c678e064fe5490324ab20e20cc0fb0e555fdeb9f813dbe9465e6cdd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: async_typer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9da6475c850a3dbfb43637eb24d30f87b5f6cf57d1cbfef415c8503cace1dea6
MD5 1d58233214e27cf4b5eaf74b640e7ac1
BLAKE2b-256 323c40fad16546537dfb8f669dbe172161153a8315db3a28566b462fae6035cf

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