openfga / openfga/python-sdk

Read and write using different tuple models

Aperta
#106 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Python
Stelle
85
Fork
36
Merge medio
3h 8m
PR unite (30g)
3

Descrizione

Checklist
Describe the problem you'd like to have solved

I added the SDK to our backend yesterday and found that there are two different models being used when reading from the store and writing to the store.

from openfga_sdk import ReadRequestTupleKey, Tuple as FgaTuple
from openfga_sdk.client.models import ClientTuple

What's the reason for this? It would just save us some code to convert between them and make things cleaner with a single model/source of truth in the backend.

Thanks!

Describe the ideal solution

Read and write uses the same model for tuples

Alternatives and current workarounds

Cast in between them when reading, altering, and writing back to the store.

References

No response

Additional context

No response

Guida per i contributori

Apri la 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.

Direzione di ricerca

Inizia tracciando le definizioni e gli utilizzi di ReadRequestTupleKey, FgaTuple e ClientTuple nell’SDK, quindi confronta i percorsi delle richieste di lettura e scrittura. Il lavoro è completato quando entrambi i percorsi usano un unico modello di tupla e i chiamanti non devono più eseguire il cast tra di essi.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.