Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feature: get the encoded data ready for sending (for async interop)

Aperta
#142 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Start by reading pywebpush.WebPusher and the functions that currently accept curl=True, focusing on how the push request is encoded and sent. Define an official way to return the endpoint, encoded data, and headers so callers can use another HTTP library, then verify that existing sending behavior remains intact.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello,
It would be nice to be able to just get the encoded push request so we could use another http library for sending the request. Our motivation is to do this in an async framework, but there could be others.

Now we do this by monkeypatching the library:

import pywebpush
pywebpush.WebPusher.as_curl = lambda self, endpoint, data, headers: {'endpoint': endpoint, 'data': data, 'headers': headers}

then we can just pass curl=True to any function and get the data we want. But it would be nicer to do this in an official way.

Lingua principale
Python
Stelle
380
Fork
61
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di web-push-libs/pywebpush

Tutte le issue di web-push-libs/pywebpush

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.