Sign up

Miguel Grinberg's Blog

Not verified No WebSub updates No webmention support Not yet validated

Public lists
davewiner/hackerNewsStars
Fetched

Miguel Grinberg's Blog
• Miguel Grinberg

I Am Not a Reverse Centaur

About a year ago I wrote on this blog about how coding with LLMs would not work for me, even if there were no ethical or environmental concerns preventing me to use them. I'm not going to repeat the arguments I made that time because my views on the subject haven' t changed....

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Solutions to the Exercises

To conclude with my SQLAlchemy 2 in Practice series, this article contains the solutions to all the exercises. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 8: SQLAlchemy and the Web

This is the eighth and final chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

Whether you are building a traditional web application, or a web API that works alongside a web front end or smartphone app, SQLAlchemy is one of the best choices to add database support to a Python web server. In this chapter two example integrations with Flask and FastAPI will be demonstrated. These are two of the most popular Python web frameworks and should serve as examples even if you use another web framework.

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 7: Asynchronous SQLAlchemy

This is the seventh chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

Starting with release 1.4, SQLAlchemy includes support for asynchronous programming with the asyncio package, for both the Core and ORM modules. This is an exciting improvement that brings the power of SQLAlchemy to modern applications such as those written with the FastAPI web framework.

Miguel Grinberg's Blog
• Miguel Grinberg

How Bitwarden Encrypts and Decrypts Secrets

As part of my efforts in reducing my dependency on Big Tech, I have been researching how to self-host my password manager. One solution that looks very promising is Vaultwarden, an open source clone of the Bitwarden cloud server. An interesting aspect of this server is that ...

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 6: A Page Analytics Solution

This is the sixth chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

The goal of this chapter is to use the concepts you have learned to build a web traffic analytics solution. This will serve as reinforcement of the techniques demonstrated in previous chapters as well as an example of a more complex and realistic database design.

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 5 - Advanced Many-To-Many Relationships

This is the fifth chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

You have now learned the design blocks used in relational databases. Sometimes, however, these building blocks have to be "tweaked" a bit to achieve a desired goal. This chapter is dedicated to exploring a very useful variation on the many-to-many relationship.

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 4 - Many-To-Many Relationships

This is the fourth chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

Continuing with the topic of relationships, this chapter is dedicated to the many-to-many type, which as its name implies, is used when it is not possible to identify any of the sides as a "one" side.

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 3 - One-To-Many Relationships

This is the third chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

In the previous chapter you learned how to execute a variety of queries on the products table. Interestingly, some of those queries were designed to obtain product manufacturers and not products, and this required duplicates to be removed by grouping the results.

Miguel Grinberg's Blog
• Miguel Grinberg

SQLAlchemy 2 In Practice - Chapter 2 - Database Tables

This is the second chapter of my SQLAlchemy 2 in Practice book. If you'd like to support my work, I encourage you to buy this book, either directly from my store or on Amazon. Thank you!

This chapter provides an overview of the most basic usage of the SQLAlchemy library to create, update and query database tables.