supabase / supabase-py

Python Client for Supabase. Query Postgres from Flask, Django, FastAPI. Python user authentication, security policies, edge functions, file storage, and realtime data streaming. Good first issue.
https://supabase.com/docs/reference/python
MIT License
1.66k stars 194 forks source link

Tutorial Request: FastAPI #63

Closed J0 closed 1 year ago

J0 commented 2 years ago

There have been multiple requests for a FastAPI tutorial. For this task, we're looking for a tutorial or blogpost which showcases the use of supabase with FastAPI.

There are no restrictions on the type of tutorial and any number of people can take this issue up. This issue is open for creative exploration but feel free to tag/ping me if ideas are needed.

leynier commented 2 years ago

Currently, I use subapase (specifically gotrue) with FastAPI, what I do is use supabase for authentication from the client, the client when making requests to an API in FastAPI sends the access_token, and from the FastAPI API, it verifies that this access_token be valid using supabase.

That is why I am currently quite focused on improving the gotrue package 😅

robertsiipola commented 2 years ago

Where should the tutorial repo exist? It seems the python project currently doesn't have an examples folder. Or should it be a wholly independent repository?

J0 commented 2 years ago

@leynier,

That's pretty cool! If you have an example somewhere we'd love to include it in this repo.

@robertsiipola I've set up an examples folder -- feel free to include any examples there.

andrashann commented 2 years ago

@leynier This setup with a FastAPI backend is exactly what I would need to get started with my supabase project; I'd be really happy if you could share your code or a write-up. Coincidentally, I think that tutorial would help close #58 as well.

aUnicornDev commented 2 years ago

I've made an API with supabase and FastAPI and deployed it on Deta. It only has two two GET requests that are querying the tables.. SO I can write a very basic guide to building and deploying an API.

karolzlot commented 2 years ago

@aUnicornDev please do so!

cloudguruab commented 2 years ago

@J0 Submitted a PR #148 for this Issue

juwiragiye commented 2 years ago

I saw someone's PR and it was merged for this issue. Can I still do it?

karolzlot commented 2 years ago

@juwiragiye I think you can, the current tutorial is fairly simple and can certainly be improved and extended. Or you can add separate one.

J0 commented 2 years ago

@juwiragiye yeah additional tutorials are always appreciated!

J0 commented 1 year ago

Closing this PR as it seems stale. I plan on recording a FastAPI video tutorial tomorrow which should hopefully address some common questions.

0xRaduan commented 1 year ago

where I can find any of these?..