Skip to content

Add capacity method #311

@ashrub-holvi

Description

@ashrub-holvi

Hi, thank you for project!

What about adding:

    def capacity(self) -> int:
        """Return capacity remaining in the limiter
        """
        self._leak()
        return self._level

?
I am still thinking, but feels like it can be needed in case you want to know how many new requests you can pick up, for example from database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions