Thanks for the video. Few remarks: 1- It would be nicer if you explained what were the flags you used when configured postgres. For example, why you used `-d` (detached mode)? why it's important to set the ports inside the container. 2- Create DockerFile: better for maintenance, control over commands\versions and packaging. 3- Create `requirements.txt` for python packages, for the same reasons and integration with docker. 4- I don't recommend to rename all imported package with underscore.
Great video thanks! One recommendation would be for you to put your docker and bash SQL queries in a text files to viewers don't have to copy these off the video and try and find the right section etc. Couldn't see them in your repo's readme either
Congratulations on 1k subscribers 🚀 well deserved I remember you mentioned in one of your videos why you import packages with underscores, can you remind me why? 😛
Thank you so much! The reason is so that it comes across as protected. Pylint would raise a warning that you are importing something with an underscore if you making use of some python file
Muito obrigado pelo seus ensinamentos, você me explicou com clareza e tirou a minha duvida, fico muito agradecido e me desculpe em falar em português kkkkkk
the command "psql -h localhost -p 5432 postgres", is it really necessary? when calling it nothing is displayed as usual in postgres bash. I got the connection without using this command! could you explain to me about?
we actually cannot run that command from inside of the database, and running from outside also does not work. I am having a problem when I am following the instruction, I am getting the error that relation "table name" does not exist
has anyone tried to connect to exisitng database using docker? I have created a database through pg admin. I have a database named Rest from public schema. I used postgres 15.3 image. When enterning the container and going to psql -U postgres I can see database Rest but I can't see any tables inside it :((
I had a problem with "sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) permission denied for schema public" while creating a table . For me worked: "grant all on schema public to 'username' "
help me bro, exit: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "ryanl"
@@ryansilva8121 i had the same issue. Collogue of mine helped me to fix this issue. If you got postgres locally installed on your laptop you have to delete it. Because when you try to create the tables it does not know which postgres it has to connect to. I hope this solution will also work for you!
There must be a missing step " sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) permission denied for schema public LINE 2: CREATE TABLE contacts ("
🔴- If you enjoyed this video please leave a Like and Subscribe :)
Thanks for the video. Few remarks:
1- It would be nicer if you explained what were the flags you used when configured postgres. For example, why you used `-d` (detached mode)? why it's important to set the ports inside the container.
2- Create DockerFile: better for maintenance, control over commands\versions and packaging.
3- Create `requirements.txt` for python packages, for the same reasons and integration with docker.
4- I don't recommend to rename all imported package with underscore.
👽 Join the Discord Server (link in the description)
I watched this tutorial last year and it's still relevant. Great Job Rithmic.🐐
YOU ARE PERFECT. thank you for this tutorial
Im really glad this was useful!
Dude I just needed this, thanks for all of your vids, they are gold
Glad you enjoyed 👾👾
Great video thanks! One recommendation would be for you to put your docker and bash SQL queries in a text files to viewers don't have to copy these off the video and try and find the right section etc. Couldn't see them in your repo's readme either
a big thanks to you. this tutorial is the most understandable in youtube. it would be totally useful to see a tutorial to docker-compose!!
Thank you very much for the comment! Yes I’m currently looking into more Docker related tutorials. Stay tuned ;)
Another great video, congrats on 1k subscribers. Could you do a video on SQLModel from Trianglo, creator of FastAPI
Yes will look into it, saw it a few weeks back and has peaked my curiosity of trying it out
Congratulations on 1k subscribers 🚀 well deserved
I remember you mentioned in one of your videos why you import packages with underscores, can you remind me why? 😛
Thank you so much!
The reason is so that it comes across as protected. Pylint would raise a warning that you are importing something with an underscore if you making use of some python file
So, you mean if there's another file trying to import this "underscore-ified" package from this file? 🤔
You really helped me! Thank you very much ;D
You are more than welcome!
hi rithmic, can you teach us on how to do migration in production with alembic correctly?
Thank you so much for all the fastapi tutorials 💯
You're more than welcome! Thanks also for the suggestion...will be planning for one :)
que elegancia de video, gracias por ofrecer contenido de valor
Thank you very much
thank you so much for the tutorial ! keep up the good work ! you help people :)
Thank you for the comment !
Why you mentioned docker in the title? when you don't you use it in the video
How do i connect to an existing postgres database to a fastapi app running on a docker container?
Muito obrigado pelo seus ensinamentos, você me explicou com clareza e tirou a minha duvida, fico muito agradecido e me desculpe em falar em português kkkkkk
the command "psql -h localhost -p 5432 postgres", is it really necessary? when calling it nothing is displayed as usual in postgres bash. I got the connection without using this command! could you explain to me about?
we actually cannot run that command from inside of the database, and running from outside also does not work. I am having a problem when I am following the instruction, I am getting the error that relation "table name" does not exist
Nice one
Thank you :)
aren't you supposed to NOT run postgres inside a docker container due to statelessness/access issues/etc ?
has anyone tried to connect to exisitng database using docker? I have created a database through pg admin. I have a database named Rest from public schema. I used postgres 15.3 image. When enterning the container and going to psql -U postgres I can see database Rest but I can't see any tables inside it :((
Thanks man
More than welcome :) Hope it is of use
What’s with the nonstandard underscore naming scheme?
where is the docker part, cant see it
Second the request: migration tutorial would great!
Yep seeing this more and more haha. Will start to plan for one at some point
Awesome, really great video, .., i want to learn that level of skill, can recommend me a course or a institute?, thanks in advance…
Best place I can recommend is RUclips. Other great content sources such as Traversy Media and FreeCodeCamp
Can you do a video on alembic migrations
what's the theme you use ?
I had a problem with "sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) permission denied for schema public" while creating a table .
For me worked: "grant all on schema public to 'username' "
GRANT CREATE ON SCHEMA public TO myuser; //give more persion to the user this will do🤙
help me bro, exit: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "ryanl"
I get the same
@@pedrosok3648 still with error?
@@ryansilva8121 i had the same issue. Collogue of mine helped me to fix this issue. If you got postgres locally installed on your laptop you have to delete it. Because when you try to create the tables it does not know which postgres it has to connect to. I hope this solution will also work for you!
@@prashants3309 how to delete it?
There must be a missing step " sqlalchemy.exc.ProgrammingError: (psycopg2.errors.InsufficientPrivilege) permission denied for schema public
LINE 2: CREATE TABLE contacts ("
If anyone runs into this I solved it by doing "grant all on schema public to myuser;"
That's annoying, I'm not sure why this wasn't picked up whilst recording. Thanks for the comment!
Unfortunately there are just too many issues with this tutorial to finish it now. I would recommend adding a requirements file next time
@@ahoymatey1234 There is a requirements file. Check the GitHub link
@@ahoymatey1234 I tried giving every access possible to myuser, but I still can't even create the models. I really don't know how to fix it