Skip to content

Commit

Permalink
mongo con
Browse files Browse the repository at this point in the history
  • Loading branch information
big-cir committed Oct 20, 2022
1 parent dfaef71 commit c57aa00
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
25 changes: 25 additions & 0 deletions con_db.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: daewon
"""

from pymongo import MongoClient
socket.setdefaulttimeout(3)


# MONGO DB CONNECT
mongodb_URI = "connection info"
client = MongoClient(mongodb_URI)
db = client.patent
db.list_collection_names()

# 콜렉션 접속
db_connection = db.get_collection("collection_name")
get_collection = db.collection_name

# { "_id" : 0}
find_data = get_collection.find({"field" : {"$exists": True}})

# get image path
image_path = get_collection.find({qeury})

0 comments on commit c57aa00

Please sign in to comment.