vutran1710 / PyrateLimiter

⚔️Python Rate-Limiter using Leaky-Bucket Algorithm Family
https://pyratelimiter.readthedocs.io
MIT License
344 stars 36 forks source link

3.x sqlite seems broken? #132

Closed indigoviolet closed 9 months ago

indigoviolet commented 1 year ago

The docs for how to get a SQLite bucket are inadequate (it seems like you have to set up the bucket table.. ) also there is a bug:

    if isawaitable(clock.now()) or isawaitable(bucket.leak(0)):
.venv/lib/python3.11/site-packages/pyrate_limiter/buckets/sqlite_bucket.py:122: in leak
    self.conn.execute(query)
E   sqlite3.OperationalError: near "ORDER": syntax error

You might want to warn users that 3.x is not ready for use (based on how much stuff is missing in #118)

vutran1710 commented 1 year ago

tks, ill investigate this erro

netanelrevah commented 9 months ago

141

vutran1710 commented 9 months ago

Fixed by @netanelrevah