SQLAlchemy ORM crash course - Learn SQLAlchemy in 1 hour

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 44

  • @JohnDoe-ce1xx
    @JohnDoe-ce1xx 8 місяців тому +5

    This is a professional grade lesson. It was great to see how you organized your files, how you made long lines of code multi-line and readable, and made each part modular. I hope more folks see this.

    • @PetsasSoftware
      @PetsasSoftware  8 місяців тому

      Thank you very much John for your kind words, I appreciate it!

  • @tascsolutions6483
    @tascsolutions6483 Рік тому +5

    Nice tutorial. I like that you kept the code and files to a minimum while still showing core concepts. I am newish to OOP and SQLAlchemy 2.0 so it helps with the learning curve.

  • @juniorforever5833
    @juniorforever5833 11 місяців тому +1

    you've increased my developing level, thx man.

    • @PetsasSoftware
      @PetsasSoftware  11 місяців тому

      Glad I could be of help! Keep coding!

  • @doctor_love_ua
    @doctor_love_ua Рік тому +3

    Thanks for the tutorial! Maybe one of the best on UA-cam!

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      You’re welcome! Thank you for you kind words and I am glad you found it useful!

  • @kwangohmoon6778
    @kwangohmoon6778 Рік тому

    The best tutorial of sqlAlchemy. Perfect combination of nicely organized content, clear voice and detail explanation. Thanks!

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      Thank you for your great words, I appreciate it!

  • @sarangtamrakar8723
    @sarangtamrakar8723 Рік тому +1

    Best ever tutorial on UA-cam ever

  • @MinhPhucDong
    @MinhPhucDong Рік тому +1

    this is very easy to understand, you made it easy to be precise, please keep up the good work.

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      Glad you found it easy to understand, thank you for your kind words!

  • @uhtredmiller
    @uhtredmiller 8 місяців тому +1

    Thanks, that was a great introduction.

    • @PetsasSoftware
      @PetsasSoftware  8 місяців тому

      Glad you enjoyed it, check out the second part too for more advanced concepts!

  • @mdsalah4231
    @mdsalah4231 8 місяців тому +1

    nice tutorial. Easy to get started with sqlalchemy

    • @PetsasSoftware
      @PetsasSoftware  8 місяців тому

      Glad you liked it! Part 2 was just released today, feel free to check it out!

  • @HussainAli-jutt
    @HussainAli-jutt Рік тому +2

    Nice tutorial! That really helped me to understand db queries 👍

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      I am glad you enjoyed it and understood db queries!

  • @fannigurt
    @fannigurt Рік тому

    it's about alchemy core)) surprise surprise but title is SQLAlchemy ORM 😀 best youtuber ever

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      I believe you are mistaken, sqlalchemy core is when you define tables manually and drop down to actual sql. Clearly I am using the ORM here as I am using models!

    • @tascsolutions6483
      @tascsolutions6483 Рік тому

      Maybe he is referring to not using mapped_columns? Which confuse me@@PetsasSoftware

  • @chriskeo392
    @chriskeo392 Рік тому +1

    What we don't need is another intro to Sqlalchemy
    What we do need is a tutorial on how to write advanced Sqlalchemy queries using window functions (rank, dense, row number), etc.

    • @PetsasSoftware
      @PetsasSoftware  Рік тому +4

      Hi Chris, it’s always good to have a base foundation to start with as it helps understand the basics. I am happy to make a more advanced tutorial in the near future!

    • @chriskeo392
      @chriskeo392 Рік тому +1

      @@PetsasSoftware looking forward to it!

    • @mm333-e1t
      @mm333-e1t Рік тому

      ua-cam.com/video/UPoHdCeg0YQ/v-deo.htmlsi=R0kPdRcieO6u30Ct

    • @IwoGda
      @IwoGda Рік тому

      @@PetsasSoftware That would be awesome!

  • @knowledgedose1956
    @knowledgedose1956 11 місяців тому +1

    Thank you, helped me a lot.
    ps: I think Pathlib is easier to use for paths

    • @PetsasSoftware
      @PetsasSoftware  11 місяців тому

      I believe you might be right thanks!

  • @mm333-e1t
    @mm333-e1t Рік тому +1

    Top quality content❤❤!! Can you also make a detailed video on flask-sqlalchemy... or is it same

    • @PetsasSoftware
      @PetsasSoftware  Рік тому +1

      Glad you enjoyed it! It's the same, the only difference is that you don't have to wire SQLAlchemy yourself. If you check one of my videos on the API series for SQLAlchemy that uses flask-sqlalchemy.

    • @mm333-e1t
      @mm333-e1t Рік тому +1

      @@PetsasSoftware sure, will definitely checkout the video. I have actually started watching that series. Thanks for such a great content brother. Hope you make videos on advanced SQL alchemy concepts as well.

    • @PetsasSoftware
      @PetsasSoftware  Рік тому +1

      Thank you for your good words! I was a bit busy with work but will definitely publish some more videos in the coming weeks!

  • @ManVsman..
    @ManVsman.. Рік тому

    It's really good
    Please guide me to next step what should I learn after this course

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      Glad you enjoyed it!
      I have a series on building a Restful API, that should be a good start:
      ua-cam.com/play/PLSLBozfq-zZfEC7jDJcj0gjW5zR8jN75p.html&si=G-Qy8GrSkj5PGxLe

  • @lesvh740
    @lesvh740 11 місяців тому +1

    Great presentation! Thank you. Should an inexperienced programmer (I'm a noob) be concerned with this from documentation: class DeclarativeBase() vs. declarative_base(). This is a level of complexity beyond my current skill. Thanks again. :)

    • @PetsasSoftware
      @PetsasSoftware  11 місяців тому +1

      It seems DeclarativeBase supersedes this function in newer versions of SQLAlchemy. If I was you I would use everything you learned from this video with the exception of using the flask-sqlalchemy package if you are using flask because it sets the starting point for you. I have a video on my channel for that as well.

  • @mm333-e1t
    @mm333-e1t Рік тому

    Hi @Demos.. How can we add ondelete constraint after we have already created the table, without having to delete the tables and the records.

    • @PetsasSoftware
      @PetsasSoftware  Рік тому

      Hi there, you can add the constraint on your model normally and then create a migration and run it, for example:
      user_id = db.Column(db.Integer, db.ForeignKey("users.id", ondelete="CASCADE"), primary_key=True)
      then run:
      flask db migrate, check that the migration looks correct and then run flask db upgrade.
      If you encounter issues then the issue might be that foreign key names are not being generated but are needed by the database itself in which case you might need to modify the generated migration file and include a unique foreign key name.
      If an existing foreign key exists you will need to drop that first and then create the new foreign key right after.
      Try this and let me know how it goes, if you come into issues I will try and offer more assistance!

  • @romantretyakov6243
    @romantretyakov6243 Рік тому +1

    If I could I would give 100 likes on this video

  • @georgiyveter6391
    @georgiyveter6391 Рік тому +1

    Sqlalchemy orm is too slow, it's better to use sqlalchemy core

  • @mugomuiruri2313
    @mugomuiruri2313 2 місяці тому

    too tiny