The other day, when I participated in (54th) Python mini Hack-a-thon, I tried using MongoDB with Python, so I will summarize it briefly.
However, there was nothing particularly difficult to use, so I will only post the links to the documents that I referred to.
The former is an introduction to MongoDB. Thank you for the Japanese translation.
It ’s a really thin book with about 40 pages.
I was able to quickly grasp that.
The latter is the official documentation.
The method of working with MongoDB in Python was concisely organized, and I was able to understand the basics in a short time.
The "Thin Book of MongoDB" says:
The real advantage of schemaless is the omission of setup and reduced friction with object-oriented programming. (Original) the real benefit of dynamic schema is the lack of setup and the reduced friction with OOP.
I really realized this.
When operating an RDBMS such as PostgreSQL with Python, you will usually use an OR mapper such as SQLAlchemy in addition to the driver.
If you want to manage the schema further, you will also need a migration tool such as Alembic.
Considering learning how to use these packages, the road to introduction is quite difficult. .. ..
However, in the case of MongoDB, it is OK to install only the driver for the time being.
There is no need to set the schema by DDL, and you can operate the DB as if you were operating an object without an OR mapper.
For the time being, I felt that the steps to use it would be considerably shorter than in the case of RDBMS.
In the future, I would like to try various things and deepen my understanding.