(1.0.3) retry handlers and more
added automatic retry handlers for 429 and 5xx error codes, as well as custom exceptions for ratelimiting, client errors, and server errors also added a more advanced user agent string constructor. previously, setting FloweryAPIConfig.user_agent would override the default user_agent. so, if you set user_agent to `foobar`, the user agent string would be `foobar` in requests. now, the user agent string sent by requests would be the following on my development machine: `'User-Agent': 'PyFlowery/1.0.3 PyFloweryTests (Python 3.12.6 (main, Sep 8 2024, 13:18:56) [GCC 14.2.1 20240805])'`
This commit is contained in:
parent
d585072d3e
commit
33b63fecc4
8 changed files with 89 additions and 25 deletions
|
@ -14,7 +14,7 @@ formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(messag
|
|||
handler.setFormatter(formatter)
|
||||
root.addHandler(handler)
|
||||
|
||||
api = FloweryAPI(FloweryAPIConfig())
|
||||
api = FloweryAPI(FloweryAPIConfig(user_agent="PyFloweryTests"))
|
||||
|
||||
ALEXANDER = "fa3ea565-121f-5efd-b4e9-59895c77df23" # TikTok
|
||||
JACOB = "38f45366-68e8-5d39-b1ef-3fd4eeb61cdb" # Microsoft Azure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue