Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Add smart Rate Limiter

Aberta
#1,101 1 comentário 4 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 5 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
python

Direção de pesquisa

Comece pelos handlers de retry integrados síncronos e assíncronos vinculados e, em seguida, compare o guia de rate limit do Java SDK. Mapeie o comportamento solicitado nos clientes de Web API, Webhook, Audit Logs e SCIM. Considera-se concluído quando uma camada de controle de tráfego ativável por opt-in oferece suporte a clientes síncronos e assíncronos, com armazenamento extensível de métricas e sem sleep bloqueante em aplicativos asyncio.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Python
Estrelas
4k
Forks
861
Merge médio
3d 17h
PRs com merge (30d)
10

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de slackapi/python-slack-sdk

Todas as issues de slackapi/python-slack-sdk

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.