Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Add smart Rate Limiter

Offen
#1,101 1 Kommentar 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 5 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
python

Rechercherichtung

Beginne mit den verknüpften synchronen und asynchronen integrierten Retry-Handlern und vergleiche anschließend den Rate-Limit-Leitfaden für das Java SDK. Übertrage das gewünschte Verhalten auf die Clients für Web API, Webhook, Audit Logs und SCIM. Als abgeschlossen gilt die Implementierung einer optional aktivierbaren Traffic-Control-Schicht, die synchrone und asynchrone Clients unterstützt, eine erweiterbare Speicherung von Metriken bietet und in asyncio-Apps kein blockierendes sleep verwendet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

audit-logs-client enhancement scim-client Version: 3x web-client

Now that we have a built-in retry handler for rate limited errors in v3.9, retrying a request after getting rate-limited is much easier than before.

However, getting rate-limited results in a much longer execution time as the whole operation. As a solution for this pain point, we will add a built-in traffic control layer like we do in the Java SDK: https://slack.dev/java-slack-sdk/guides/web-api-basics#rate-limits

A few points to consider for implementing this feature:

  • The module manages the amount of requests in the last minute and calculate the interval before the next API call
  • Metrics data can be in memory in most use cases but the part should be extensible to switch to other data storage (e.g., Redis)
  • As we do in the Java SDK, running the same script/app in multiple hosts should be supported.
  • For backward-compatibility, we don't turn the feature on by default. Users can enable it only when they want it.
  • Both sync and async API clients should be supported in a proper way (= don't use time.sleep in asyncio apps)
  • All API clients (Web API, Audit Logs, SCIM, Webhook) should have the functionality.
Category (place an x in each of the [ ])
  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)
Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Vorherrschende Sprache
Python
Sterne
4k
Forks
861
Ø Merge
3 T. 17 Std.
Gemergte PRs (30 T.)
10

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus slackapi/python-slack-sdk

Alle Issues in slackapi/python-slack-sdk

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.