How to use the aiolimiter.__version__ function in aiolimiter

To help you get started, we’ve selected a few aiolimiter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mjpieters / aiolimiter / tests / test_aiolimiter.py View on Github external
def test_version():
    # the version is taken from metadata
    from aiolimiter import __version__

    assert __version__

    pyproject = Path(__file__).resolve().parent.parent / "pyproject.toml"
    with pyproject as f:
        metadata = toml.load(f)["tool"]["poetry"]

    # pyproject bumps to -alpha.0, -beta.1, etc., but releases a0, b1
    # We don't really need to care about those, just verify that sorta
    # the right version is used.
    assert __version__.startswith(metadata["version"].partition("-")[0])

aiolimiter

asyncio rate limiter, a leaky bucket implementation

MIT
Latest version published 17 days ago

Package Health Score

79 / 100
Full package analysis