In [1]:
from pymongo import MongoClient
client = MongoClient(
"mongodb.fastcamp.us",
)
In [2]:
db = client["dobestan"]
In [3]:
collection = db["zigbang"]
In [4]:
collection.remove()
collection = db["zigbang"]
In [5]:
data = {
'deposit': 1000,
'rent': 50,
'address': "서울특별시 관악구 남부순환로 1799 대영오피스텔",
}
collection.insert_one(data)
Out[5]:
In [6]:
collection.find_one()
Out[6]: