MongoDB for the first time in Python

Introduction

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.

Referenced documents

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.

Impressions I tried using

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.

Recommended Posts

MongoDB for the first time in Python
See python for the first time
Kaggle for the first time (kaggle ①)
I tried python programming for the first time.
Kaguru for the first time
A useful note when using Python for the first time in a while
What I got into Python for the first time
I tried Python on Mac for the first time.
Register a task in cron for the first time
I tried python on heroku for the first time
[For self-learning] Go2 for the first time
Start Django for the first time
The first step in Python Matplotlib
First time python
First time python
Summary of stumbling blocks in Django for the first time
[Understand in the shortest time] Python basics for data analysis
I tried tensorflow for the first time
Python Master RTA for the time being
Let's try Linux for the first time
Differences C # engineers felt when learning python for the first time
Try using FireBase Cloud Firestore in Python for the time being
CERTIFICATE_VERIFY_FAILED in Python 3.6, the official installer for macOS
I tried using scrapy for the first time
How to use MkDocs for the first time
Use logger with Python for the time being
[Note] Deploying Azure Functions for the first time
Tips for hitting the ATND API in Python
I tried Mind Meld for the first time
Settings for getting started with MongoDB in python
Try posting to Qiita for the first time
For the first time in Numpy, I will update it from time to time
Since I'm free, the front-end engineer tried Python (v3.7.5) for the first time.
The story of returning to the front line for the first time in 5 years and refactoring Python Django
What I learned by writing a Python Pull Request for the first time in my life
Download the file in Python
Find the difference in Python
Run with CentOS7 + Apache2.4 + Python3.6 for the time being
[Python] Measures and displays the time required for processing
Output the time from the time the program was started in python
Search for strings in Python
Use MongoDB ODM in Python
For the first time, I learned about Unix (Linux).
Techniques for sorting in Python
python in mongodb in descending sort
Turn multiple lists with a for statement at the same time in Python
AI Gaming I tried it for the first time
About "for _ in range ():" in python
After attending school, I participated in SIGNATE's BEGINNER limited competition for the first time.
Check the processing time and the number of calls for each process in python (cProfile)
Check the operation of Python for .NET in each environment
[Python] Display the elapsed time in hours, minutes, and seconds (00:00:00)
Get the current date and time in Python, considering the time difference
I tried the Google Cloud Vision API for the first time
Google search for the last line of the file in Python
If you're learning Linux for the first time, do this!
Check for memory leaks in Python
Getting the arXiv API in Python
Check for external commands in python
First Python 3 ~ The beginning of repetition ~
Python in the browser: Brython's recommendation