Пікірлер
@JayendrasinhSOLANKI-s3w
@JayendrasinhSOLANKI-s3w 2 ай бұрын
which fonts you are using in vscode?
@jr.developer
@jr.developer Ай бұрын
The font that I used in this video is called Operator Mono but I recently started using IBM Plex Mono which looks beautiful too.
@ramzirebai3661
@ramzirebai3661 2 ай бұрын
Not All Heroes Wear Capes. Thank you so much
@laurencenakounou
@laurencenakounou 3 ай бұрын
How do you create the fold Server ?
@jr.developer
@jr.developer 3 ай бұрын
It was explained in the previous video which you can find in the info cards.
@mehul4mak
@mehul4mak 5 ай бұрын
Why you are not having jsx file for react. I am novice to frontend
@jr.developer
@jr.developer 4 ай бұрын
I learned React back in 2019 casually. I never worked on it for a couple of years and was a little rusty but nowadays I only use jsx / tsx files for react components.
@eddysanoli
@eddysanoli 5 ай бұрын
That is one crunchy keyboard. Great stuff
@CuriousMindYoutube
@CuriousMindYoutube 6 ай бұрын
i am trying to mount at app.mount('/socketserver', sio_app) but it doesn't work error like RuntimeError: Expected ASGI message 'websocket.accept', 'websocket.close', or 'websocket.http.response.start' but got 'http.response.start'. But if i mount at app.mount('/', sio_app) it works why is that? but if a mount of root rest api no longer work
@gopikrishna3481
@gopikrishna3481 8 ай бұрын
​​@jr.developer I have tried for a larger zip file with streaming response, once the file is available to download then chrome is crashing and unable to view swagger.. So I'm unable to download the file.. So instead of that can we directly download into the downloads folder whenever api is called?
@jr.developer
@jr.developer 8 ай бұрын
Swagger might be overwhelmed by the large file size. It's just for us to understand and document our APIs easily. You can put the endpoint in the browser and that should start the download process. For the browser to show the download progress - try adding the Content-Length header in the response. Hope that helps. Thank you for your comment.
@gopikrishna3481
@gopikrishna3481 8 ай бұрын
Does the download api work for larger files with size greater than 2GB
@jr.developer
@jr.developer 8 ай бұрын
It would be limited by the available disk space. I would definately not consider this for large files. For large files, we can consider streaming. I haven't tried it myself yet but I found a FastAPI + boto example - stackoverflow.com/questions/69617252/response-file-stream-from-s3-fastapi
@gopikrishna3481
@gopikrishna3481 8 ай бұрын
​@@jr.developerI have tried for a larger zip file with streaming response, once the file is available to download then chrome is crashing and unable to view swagger.. So I'm unable to download the file.. So instead of that can we directly download into the downloads folder whenever api is called?
@jr.developer
@jr.developer 3 ай бұрын
Swagger is not the way to interact with your API. It's just for documentation purposes and quickly becomes unresponsive even for a large JSON response. Please, consider opening the API endpoint in a browser directly and the browser should let you choose a location on your computer.
@Byte_codes_Engineers
@Byte_codes_Engineers 10 ай бұрын
@Jr.developer please help me in socketio with FastApi please please
@dannisisgt
@dannisisgt 10 ай бұрын
Thanks Amigo, very well explained. What if data has 10k+ records every query load all data and split it?
@jr.developer
@jr.developer 9 ай бұрын
You could write your own paginate function with custom logic. In that you would need to handle logic to get total row count and calculate the offset and limit values to query the database to get the desired page rows. Here's an example from the latest docs - uriyyo-fastapi-pagination.netlify.app/tutorials_advanced/custom-paginate/ Sorry for the delay. I hope this helps you.
@codeman2
@codeman2 10 ай бұрын
what if we want to further use return value of func in timing context function
@jr.developer
@jr.developer 10 ай бұрын
I don't have a perfect answer for that but one thing that you can do is write a class based context manager and use it's attributes to store necessary returned value. Check out this basic example - gist.github.com/Satishpokala124/9c21aa6d5ee6d6d86afcfe352a933a2f
@LuizJrDeveloper
@LuizJrDeveloper 10 ай бұрын
Your video helped me a lot to create a cool flow for the application with socketio. Thanks
@Byte_codes_Engineers
@Byte_codes_Engineers 10 ай бұрын
Hi , can you please share m out you did this because I am not able to communicate socketio with fastapi
@Byte_codes_Engineers
@Byte_codes_Engineers 10 ай бұрын
Please please help m out in this
@LuizJrDeveloper
@LuizJrDeveloper 10 ай бұрын
I'm going to take some time to make a working example.
@shoprecartteam9567
@shoprecartteam9567 Жыл бұрын
Man I getting this error; RuntimeError: Expected ASGI message 'websocket.accept' or 'websocket.close', but got 'http.response.start'. INFO: connection open INFO: connection closed ERROR: Exception in ASGI application
@jr.developer
@jr.developer Жыл бұрын
Could you provide more details? Make sure you have installed all dependencies and using socket.io client to connect to the server. I tried connecting through postman and got a similar error.
@nimrodkatzenell5555
@nimrodkatzenell5555 9 ай бұрын
@@jr.developer i am getting a similar error the "from socket import sio_app" there is no such model as sio_app I installed the requirements.txt and made sure that the environment is set up
@RajveerSingh-vf7pr
@RajveerSingh-vf7pr Жыл бұрын
Great Video, but video starts at 10:00
@Pao-Frit
@Pao-Frit Жыл бұрын
I was looking for gold but finded diamonds. Very good content!
@artemshumeiko
@artemshumeiko Жыл бұрын
Thanks a lot! Do you have same code version with aioboto3 implemented instead boto3?
@jr.developer
@jr.developer Жыл бұрын
Sorry, but I haven't tried that yet. It should be similar to boto3 though.
@HeavyBlues101
@HeavyBlues101 Жыл бұрын
Great example of several advanced Python concepts working together, well explained. Thank you!
@M-ABDULLAH-AZIZ
@M-ABDULLAH-AZIZ Жыл бұрын
how does one deploy this?
@jr.developer
@jr.developer Жыл бұрын
For quick testing you can deploy to an AWS EC2 instance. Use Nginx to serve frontend at default http port and chose another port like 8000 for the API. Set the CORS in FastAPI to allow requests from the Frontend. For production you wouldn't want to do this. You need to deploy to something like AWS ROSA. I hope that answers your question.
@gokulraj6633
@gokulraj6633 Жыл бұрын
thanks a lot
@sardarjagpreetsingh190
@sardarjagpreetsingh190 Жыл бұрын
Is this working in aws lambda function?
@jr.developer
@jr.developer Жыл бұрын
No. This wouldn't work on AWS lambda.
@apraveena
@apraveena Жыл бұрын
Thank you so much for the video, exactly what I needed.. How and where do we provide authentication details?
@jr.developer
@jr.developer Жыл бұрын
For JWT based authentication you can follow these nice tutorials in their documentation 1. Generate tokens - fastapi.tiangolo.com/tutorial/security/first-steps/ 2. Get user details - fastapi.tiangolo.com/tutorial/security/get-current-user/
@pkleiz
@pkleiz Жыл бұрын
Nice indian guy
@ahmedzahid8354
@ahmedzahid8354 Жыл бұрын
Thanks for this video.
@yonyoon19
@yonyoon19 Жыл бұрын
/-> nfactorial incubator 2023 <-/
@-Jakob-
@-Jakob- Жыл бұрын
if you install the package 'websockets' then you also have the websockets support (not only polling)
@eluented
@eluented Жыл бұрын
thank you man amazing video keep it up! new sub
@nikilkvn
@nikilkvn Жыл бұрын
Thanks so much for the content.,. But I was getting "Object of type bytes is not JSON serializable" tried the exact same code.. am able to print the contents in bytes.. but the response is failing somehow..
@nikilkvn
@nikilkvn Жыл бұрын
my mistake.. I was using JsonResponse instead the regular Response. Thanks a lot for the video.
@nikilkvn
@nikilkvn Жыл бұрын
woww man.. you are simply good.. :) keep going..
@uriyyo
@uriyyo Жыл бұрын
Hi, I am an author of fastapi-pagination library and I love your tutorial. Keep going!
@jr.developer
@jr.developer Жыл бұрын
Thank you so much for commenting and creating such a great library 🙂
@buiduc2412
@buiduc2412 Жыл бұрын
can i ask what extension you use in vs code that can warn like "s3_upload" not defined like min 8:24
@jr.developer
@jr.developer Жыл бұрын
It's called Error Lens. VS Code extension id: usernamehw.errorlens
@po6577
@po6577 Жыл бұрын
great video, this include all the basics i need, cheers mate
@jr.developer
@jr.developer Жыл бұрын
I'm glad that it helped you 👍🏻
@jr.developer
@jr.developer Жыл бұрын
Source code: github.com/jrdeveloper124/file-transfer/blob/main/main.py
@jr.developer
@jr.developer Жыл бұрын
Source code: github.com/jrdeveloper124/file-transfer/blob/main/main.py
@nagrajankola1323
@nagrajankola1323 Жыл бұрын
source code?
@jr.developer
@jr.developer Жыл бұрын
Sorry for the delay. Checkout the pinned comment. Thanks.
@javascriptexpanse
@javascriptexpanse Жыл бұрын
good job - notify us if add delete and media and emoji uploading functionality
@ikeecode3410
@ikeecode3410 Жыл бұрын
Hello thank you for the video, can you explain how you set up your bucket first ?
@jr.developer
@jr.developer Жыл бұрын
Creating an S3 bucket is quite simple just head over to the s3 console: s3.console.aws.amazon.com and click on the create button. If you still need more details checkout their guide here: docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html I realized that I didn't cover this after I have uploaded the video. So, I gave a brief on how to configure the credentials to access AWS in the next video: kzbin.info/www/bejne/o3_agJKwa8uUd9k . Please, check that out if you haven't already. I'm planning to make another video which includes JWT authorization while downloading/uploading files. I'll make sure that I cover the basics in that. I hope this helps. Thank you for the comment.
@ikeecode3410
@ikeecode3410 Жыл бұрын
@@jr.developer Thank you for the videos
@mr.deep.
@mr.deep. Жыл бұрын
Thanks
@mr.deep.
@mr.deep. Жыл бұрын
Please upload more video on aws
@azabelletale5013
@azabelletale5013 Жыл бұрын
Thank you for the great video. It saved me. Would you please do a video for how to do it with authorization (jwt) as well?
@jr.developer
@jr.developer Жыл бұрын
Will do... Thanks for the idea 👍🏻
@helix8847
@helix8847 Жыл бұрын
Is this React Native or React JS?
@jr.developer
@jr.developer Жыл бұрын
It's React JS
@khyatisonkar
@khyatisonkar Жыл бұрын
hi, how can we download all files present inside the amazon s3 bucket?
@jr.developer
@jr.developer Жыл бұрын
Great question! I have never run into a situation where I needed to download all files from s3(which might take a significant amount of time based on the number of files in your bucket). I found a few interesting solutions on stackoverflow: stackoverflow.com/questions/31918960/boto3-to-download-all-files-from-a-s3-bucket. Hope that helps...
@jr.developer
@jr.developer Жыл бұрын
Python decorators for sync and async functions : kzbin.info/www/bejne/qZi5m3Z9l7elosk
@jr.developer
@jr.developer Жыл бұрын
Twinkle tray for Windows: apps.microsoft.com/store/detail/twinkle-tray-brightness-slider/9PLJWWSV01LK?hl=en-in&gl=in&rtc=1 ddccontrol for Linux: github.com/ddccontrol/ddccontrol
@xsdash
@xsdash Жыл бұрын
what is the font name or theme used for vscode editor ?
@jr.developer
@jr.developer Жыл бұрын
Theme: Sublime Material Theme - Dark. You can get through this extension jprestidge.theme-material-theme on VS Code. Font: Operartor Mono. I think I got it from this repo - github.com/keyding/Operator-Mono Thank you for your comment.
@Byte_codes_Engineers
@Byte_codes_Engineers 10 ай бұрын
​@@jr.developerhi can you please help me out with socket io and fastapi I am not be able communicate please please big request help m bro please
@gadamsettiakhil
@gadamsettiakhil Жыл бұрын
this is very helpful
@codexperience7951
@codexperience7951 Жыл бұрын
Bro what is your linter for python
@jr.developer
@jr.developer Жыл бұрын
It's just the VS Code extension: Python by Microsoft. Also, make sure that you have autopep8 installed for it to work.
@jr.developer
@jr.developer Жыл бұрын
Here's the link to the source code: github.com/jrdeveloper124/pagination
@jr.developer
@jr.developer Жыл бұрын
Here's the link to the source code: github.com/jrdeveloper124/pagination
@jr.developer
@jr.developer Жыл бұрын
Here's the link to the source code: github.com/jrdeveloper124/pagination
@pleabargain
@pleabargain Жыл бұрын
Thank you sir!
@pleabargain
@pleabargain Жыл бұрын
Question: I'm getting a cors error. I've tried putting headers into the fetch command. I reloaded but still getting the 'localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Please advise.
@jr.developer
@jr.developer Жыл бұрын
You need to add the CORS Middleware to your FastAPI application which we built in the previous video. Sorry, I should have showed it in the video. I will talk about this in the next video. Add the following code to your FastAPI app in the main.py file ----------------------------------------------------------------------------------- from fastapi import FastAPI # import the middleware from fastapi.middleware.cors import CORSMiddleware app = FastAPI() # add middleware to your FastAPI app app.add_middleware( CORSMiddleware, allow_origins=['localhost:3000'], allow_credentials=True, allow_methods=['*'], allow_headers=['*'], ) ----------------------------------------------------------------------------------- Please checkout the documentation for more info -> fastapi.tiangolo.com/tutorial/cors/?h=cors#use-corsmiddleware
@pleabargain
@pleabargain Жыл бұрын
source code? I'm trying to work through your tutorial but w/out source code it's really not clear.
@jr.developer
@jr.developer Жыл бұрын
I'm working on that and will add a pinned comment with a link soon. Thanks for the feedback.