🚀 Feature: Native Asyncio Support for Python SDK
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #1529 di @bhardwajparth51 — chiusa senza merge
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
Direzione di ricerca
Inizia tracciando il generatore dell’SDK Python e i relativi percorsi esistenti di generazione di Client e Service, quindi esamina PR #453 e il riferimento parameterDispatchBlock di Twig menzionato nell’issue. Il lavoro è completo quando un Client espone metodi di Service sincroni e asincroni abbinati, utilizza la transizione proposta a httpx e preserva il comportamento sincrono esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🔖 Feature description
I propose implementing native asyncio support for the Python SDK using a Unified Client architecture. Instead of introducing a separate AsyncClient or a package.aio submodule (which stalled previous attempts like PR #453), asynchronous capabilities should be integrated directly into the existing Client and Service classes.
Core Implementation:
- A single
Clientobject handles both workflows. - Every service method is generated in a "Dual-Mode" pair directly alongside each other:
- Synchronous:
def list(self, ...): - Asynchronous:
async def list_async(self, ...):
- Synchronous:
- We transition the underlying HTTP engine from
requeststohttpx, which natively supports both synchronous and asynchronous operations using an identical API shape, making the dual-mode generator templates trivial to maintain.
🎤 Pitch
The community has requested native Python async support for over two years (Issue #26). Implementing a unified "Dual-Mode" pattern solves the architectural friction that halted previous PRs:
- Maintainer Alignment: It addresses the exact feedback provided by core contributors in PR #453, who requested that async methods live alongside sync methods without requiring users to instantiate a whole new
AsyncClientclass. - Modern Developer Experience: Frameworks like FastAPI, Starlette, and Sanic are now standard. Developers must be able to
await client.users.list_async()natively without blocking the event loop or hacking togetherThreadPoolExecutors. - Zero Maintenance Drift: By utilizing Twig
parameterDispatchBlockfilters in the generator (similar to the new dual-mode C++ SDK), the synchronous and asynchronous methods are generated from the exact same spec source. They will never fall out of sync as the API evolves. - 100% Backwards Compatible: Existing code using
requestssemantics remains totally unaffected since standarddefmethods will work exactly as they did before.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
- Lingua principale
- Twig
- Stelle
- 330
- Fork
- 212
- Merge medio
- 12h 3m
- PR unite (30g)
- 131
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di appwrite/sdk-generator
-
🐛 Bug Report: Execution.fromMap throws Bad state: No element when server doesn't return resourceType (pre-Sites serversForse di nuovo libera @Aakriti7-giti l’ha presa 79 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
appwrite/sdk-generator#1858 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Generate Push by default for SDKs that already released itForse di nuovo libera @ChiragAgg5k l’ha presa 34 giorni fa e non c’è nessuna pull request aperta. Aperta
appwrite/sdk-generator#2043 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
appwrite/sdk-generator#1996 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
appwrite/sdk-generator#1851 ·
I maintainer di solito rispondono entro 1 giorno
-
📚 Documentation: Add Vale linting for all generated docs and examplesForse già presa @kekubhai l’ha presa 74 giorni fa. Aperta
appwrite/sdk-generator#1822 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di appwrite/sdk-generator
Issue simili
-
chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
addyosmani/agent-skills#802 ·
I maintainer di solito rispondono entro 4 giorni
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Fission-AI/OpenSpec#2271 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno