Bug#1084153: ITP: python-ratelimit -- API rate limit decorator

Alexandre Detiste <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.general,gmane.linux.debian.devel.medical
Message-ID <CADsTwjLSBRq=2S09xQVS21YrJCdS3XwY1ZaOVBxXs2s7ge6gGQ@mail.gmail.com>
Hi,

If you are in a hurry, you can try to replace ratelimit with ratelimiter;
which is really similar & already packaged.

I will monitor this effort and switch back pybel to the real
python3-ratelimit if/when it gets in the archive.

Greetings and thank you




----
pybel/debian/patches/ratelimit_is_not_packaged.patch

--- a/src/pybel/manager/citation_utils.py
+++ b/src/pybel/manager/citation_utils.py
@@ -8,7 +8,7 @@
from functools import lru_cache
from typing import Any, Dict, Iterable, List, Mapping, Optional, Set,
Tuple, Union

-import ratelimit
+import ratelimiter
import requests
from more_itertools import chunked
from sqlalchemy import and_
@@ -82,7 +82,7 @@
    return sorted({i for i in _identifiers if i})


[email protected](calls=3, period=1)
[email protected](max_calls=3, period=1)
def get_pubmed_citation_response(pubmed_identifiers: Iterable[str]):
    """Get the response from PubMed E-Utils for a given list of PubMed
identifiers.

Le sam. 5 oct. 2024 à 20:33, Ananthu C V <[email protected]> a écrit :
>
> Package: wnpp
> Severity: wishlist
> Owner: Ananthu C V <[email protected]>
> X-Debbugs-Cc: [email protected]
>
> It is a dependency for pyflume, a dependency required by
> homeassistant.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.