SlideShare a Scribd company logo
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
Open Source Programming
Data Store – NoSQL with Python: Getting Started
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
Various Storage Types – e.g., Azure Cloud
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
NoSQL – type and examples
• non-SQL / non-relational approach / Not only SQL
Source: https://en.wikipedia.org/wiki/NoSQL
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
NoSQL with open sources – e.g., MEAN stack
• M: MongoDB
• E: Express.js
• A: AngularJS
• N: Node.js
• Why NoSQL in MEAN Stack?
• For programs that use JSON-
like BSON (binary JSON)
documents with schema
• MongoDB supports its use of
JSON-like documents for
interacting with data as
opposed to the row/column
model
Source: https://en.wikipedia.org/wiki/MEAN_(solution_stack)
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• Environment: Ubuntu 20.04 LTS with Python 3
• Example 1: DB Connection test with pymongo
• Example 2: CRUD with MongoDB & Python
Using NoSQL (MongoDB) with Python
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• Install MongoDB on Ubuntu 20.04 LTS:
Using MongoDB with Python: 1. Install MongoDB
$ sudo apt install -y mongodb
$ sudo systemctl status mongodb
$ mongod --version
Output
db version v3.6.8
git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020
allocator: tcmalloc
modules: none
build environment:
distarch: x86_64
target_arch: x86_64
https://aka.ms/mongodb-install-on-ubuntu
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• Sample MongoDB connection test:
Using MongoDB with Python: 2. Connection
$ mongo --host 127.0.0.1:27017
> use admin;
switched to db admin
> db.createUser( { user: "administrator", pwd: "Pa55w.rd", roles: [ { role:
"userAdminAnyDatabase", db: "admin" }, { role: "clusterMonitor", db:"admin" },
"readWriteAnyDatabase" ] } );
Output
Successfully added user: {
"user" : "administrator",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "clusterMonitor",
"db" : "admin"
},
"readWriteAnyDatabase"
]
}
> exit;
https://aka.ms/mongodb-from-azure-cosmosdb
Successfully added user: {
"user" : "administrator",
"roles" : [
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "clusterMonitor",
"db" : "admin"
},
"readWriteAnyDatabase"
]
}
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• Sample MongoDB connection test:
Using MongoDB with Python: 3. New User
$ mongo admin -u "administrator" -p "Pa55w.rd" --host 127.0.0.1:27017
> use DeviceData;
switched to db DeviceData
> db.createUser(
{
user: "deviceadmin",
pwd: "Pa55w.rd",
roles: [ { role: "readWrite", db: "DeviceData" } ]
}
);
Output
Successfully added user: {
"user" : "deviceadmin",
"roles" : [
{
"role" : "readWrite",
"db" : "DeviceData"
}
]
}
> exit;
https://aka.ms/mongodb-from-azure-cosmosdb
Successfully added user: {
"user" : "deviceadmin",
"roles" : [
{
"role" : "readWrite",
"db" : "DeviceData"
}
]
}
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin
Using MongoDB with Python: 4. Connection Test
# GitHub Gist on https://bit.ly/mongodb-python-connection-test-sample
$ wget -O mongodb-connection-test.py https://bit.ly/mongodb-python-connection-test-sample-raw
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install pymongo
$ python mongodb-connection-test.py
Enter your primary connection string:
mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin
Output
{'allocator': 'tcmalloc',
'bits': 64,
'buildEnvironment': {'cc': 'cc: cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0',
'ccflags': '-fno-omit-frame-pointer -fno-strict-aliasing '
'-ggdb -pthread -Wall -Wsign-compare ‘
…
https://bit.ly/mongodb-python-connection-test-sample
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
• CRUD: Create, Retrieve, Update, and Delete
Using MongoDB with Python: 5. CRUD w/ Flask
$ git clone https://github.com/ianychoi/flask-mongodb.git
$ cd flask-mongodb
$ deactivate # if you were using another virtual environment
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ flask run --host=0.0.0.0 --port=8080
Enter your primary connection string:
mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin
Output (example of an Azure Linux VM: 8080 port has been open through Azure Portal)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
Enter your primary connection string:
* Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://127.0.0.1:8080
* Running on http://10.1.0.4:8080 (Press CTRL+C to quit)
https://github.com/ianychoi/flask-mongodb
[Open Source Programming] Data Store – NoSQL with Python: Getting Started
Finished!

More Related Content

Similar to 오픈 소스 프로그래밍 - NoSQL with Python

Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
MongoDB
 
Back to Basics Webinar 2 - Your First MongoDB Application
Back to  Basics Webinar 2 - Your First MongoDB ApplicationBack to  Basics Webinar 2 - Your First MongoDB Application
Back to Basics Webinar 2 - Your First MongoDB Application
Joe Drumgoole
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
Back to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDBBack to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDB
MongoDB
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Jian-Hong Pan
 
DevNet Associate : Python introduction
DevNet Associate : Python introductionDevNet Associate : Python introduction
DevNet Associate : Python introduction
Joel W. King
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
MongoDB
 
NoSQL on microsoft azure april 2014
NoSQL on microsoft azure   april 2014NoSQL on microsoft azure   april 2014
NoSQL on microsoft azure april 2014
Brian Benz
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
Andrey Karpov
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
MarcinStachniuk
 
Nodejs
NodejsNodejs
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
async_io
 
Get expertise with mongo db
Get expertise with mongo dbGet expertise with mongo db
Get expertise with mongo db
Amit Thakkar
 
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxMongoDB
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
Ben Hall
 
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
Alessandro Molina
 
RESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerRESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with Docker
Bertrand Delacretaz
 
Mongodb
MongodbMongodb
Mongodb
Scott Motte
 

Similar to 오픈 소스 프로그래밍 - NoSQL with Python (20)

Back to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB ApplicationBack to Basics Webinar 2: Your First MongoDB Application
Back to Basics Webinar 2: Your First MongoDB Application
 
Back to Basics Webinar 2 - Your First MongoDB Application
Back to  Basics Webinar 2 - Your First MongoDB ApplicationBack to  Basics Webinar 2 - Your First MongoDB Application
Back to Basics Webinar 2 - Your First MongoDB Application
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Back to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDBBack to Basics, webinar 2: La tua prima applicazione MongoDB
Back to Basics, webinar 2: La tua prima applicazione MongoDB
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
DevNet Associate : Python introduction
DevNet Associate : Python introductionDevNet Associate : Python introduction
DevNet Associate : Python introduction
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
 
NoSQL on microsoft azure april 2014
NoSQL on microsoft azure   april 2014NoSQL on microsoft azure   april 2014
NoSQL on microsoft azure april 2014
 
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsPVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agents
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Nodejs
NodejsNodejs
Nodejs
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Get expertise with mongo db
Get expertise with mongo dbGet expertise with mongo db
Get expertise with mongo db
 
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptxSH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
SH 1 - SES 4 - Microservices - Andrew Morgan TLV.pptx
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
EuroPython 2013 - FAST, DOCUMENTED AND RELIABLE JSON BASED WEBSERVICES WITH P...
 
RESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with DockerRESTful OSGi middleware for NoSQL databases with Docker
RESTful OSGi middleware for NoSQL databases with Docker
 
Mongodb
MongodbMongodb
Mongodb
 

More from Ian Choi

Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
Ian Choi
 
클라우드 컴퓨팅 기본 사항 (Fundamentals)
클라우드 컴퓨팅 기본 사항 (Fundamentals)클라우드 컴퓨팅 기본 사항 (Fundamentals)
클라우드 컴퓨팅 기본 사항 (Fundamentals)
Ian Choi
 
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
Ian Choi
 
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
Ian Choi
 
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
Ian Choi
 
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
Ian Choi
 
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
Ian Choi
 
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
Ian Choi
 
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
Ian Choi
 
Microsoft loves communities - Korea DevRel Team
Microsoft loves communities - Korea DevRel TeamMicrosoft loves communities - Korea DevRel Team
Microsoft loves communities - Korea DevRel Team
Ian Choi
 
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
Ian Choi
 
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
Ian Choi
 
[201808] GitHub 사용하기 - GIt & 협업 활용
[201808] GitHub 사용하기 - GIt & 협업 활용[201808] GitHub 사용하기 - GIt & 협업 활용
[201808] GitHub 사용하기 - GIt & 협업 활용
Ian Choi
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
Ian Choi
 
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
Ian Choi
 
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
Ian Choi
 
OpenStack 2018 Vancouver Summit 후기
OpenStack 2018 Vancouver Summit 후기OpenStack 2018 Vancouver Summit 후기
OpenStack 2018 Vancouver Summit 후기
Ian Choi
 
"docs.microsoft.com"에 기여하기
"docs.microsoft.com"에 기여하기"docs.microsoft.com"에 기여하기
"docs.microsoft.com"에 기여하기
Ian Choi
 
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
Ian Choi
 
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
Ian Choi
 

More from Ian Choi (20)

Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
Ship it! ⛴️ AKS에 스프링 앱 배포하기 at Microsoft x GitHub Roadshow 2023
 
클라우드 컴퓨팅 기본 사항 (Fundamentals)
클라우드 컴퓨팅 기본 사항 (Fundamentals)클라우드 컴퓨팅 기본 사항 (Fundamentals)
클라우드 컴퓨팅 기본 사항 (Fundamentals)
 
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
디자인에 이어 코딩까지 AI가 프로그램 개발을 척척?: GitHub Copilot, 어디까지 알아보셨나요
 
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
마이크로소프트 애저 및 클라우드 트렌드 소개 (부제: Beyond IaaS)
 
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
Evolving Translation and Internationalization in OpenStack & Kubernetes commu...
 
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
쿠버네티스 오픈 소스와 클라우드 매니지드 서비스 접점 소개
 
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
Azure 클라우드 학생 계정 & Ubuntu VM 셋업 (Mar 2022)
 
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
OpenStack I18n Product Update at Shanghai: how OpenStack translation started ...
 
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
[OpenInfra Days Vietnam 2019] Innovation with open sources and app modernizat...
 
Microsoft loves communities - Korea DevRel Team
Microsoft loves communities - Korea DevRel TeamMicrosoft loves communities - Korea DevRel Team
Microsoft loves communities - Korea DevRel Team
 
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
DevOps와 함께 살펴보는 (해커톤의 성패를 좌우하는) 협업/개발 툴
 
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
국제화/번역과 함께 하는 오픈소스에 대한 경험 및 노하우
 
[201808] GitHub 사용하기 - GIt & 협업 활용
[201808] GitHub 사용하기 - GIt & 협업 활용[201808] GitHub 사용하기 - GIt & 협업 활용
[201808] GitHub 사용하기 - GIt & 협업 활용
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
 
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
[2018 KOSSLAB 컨트리뷰톤] 오픈스택 (OpenStack) 프로젝트 소개 + 업스트림 컨트리뷰션
 
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
[2018 공개SW그랜드챌린지] 오픈 인프라와 오픈 커뮤니티에서의 협력
 
OpenStack 2018 Vancouver Summit 후기
OpenStack 2018 Vancouver Summit 후기OpenStack 2018 Vancouver Summit 후기
OpenStack 2018 Vancouver Summit 후기
 
"docs.microsoft.com"에 기여하기
"docs.microsoft.com"에 기여하기"docs.microsoft.com"에 기여하기
"docs.microsoft.com"에 기여하기
 
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
[Pycon KR 2017] Rst와 함께하는 Python 문서 작성 & OpenStack 문서 활용 사례
 
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
명령 프롬프트, Azure CLI 2.0은 과연 코딩일까?
 

Recently uploaded

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 

Recently uploaded (20)

Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 

오픈 소스 프로그래밍 - NoSQL with Python

  • 1. [Open Source Programming] Data Store – NoSQL with Python: Getting Started Open Source Programming Data Store – NoSQL with Python: Getting Started
  • 2. [Open Source Programming] Data Store – NoSQL with Python: Getting Started Various Storage Types – e.g., Azure Cloud
  • 3. [Open Source Programming] Data Store – NoSQL with Python: Getting Started NoSQL – type and examples • non-SQL / non-relational approach / Not only SQL Source: https://en.wikipedia.org/wiki/NoSQL
  • 4. [Open Source Programming] Data Store – NoSQL with Python: Getting Started NoSQL with open sources – e.g., MEAN stack • M: MongoDB • E: Express.js • A: AngularJS • N: Node.js • Why NoSQL in MEAN Stack? • For programs that use JSON- like BSON (binary JSON) documents with schema • MongoDB supports its use of JSON-like documents for interacting with data as opposed to the row/column model Source: https://en.wikipedia.org/wiki/MEAN_(solution_stack)
  • 5. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • Environment: Ubuntu 20.04 LTS with Python 3 • Example 1: DB Connection test with pymongo • Example 2: CRUD with MongoDB & Python Using NoSQL (MongoDB) with Python
  • 6. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • Install MongoDB on Ubuntu 20.04 LTS: Using MongoDB with Python: 1. Install MongoDB $ sudo apt install -y mongodb $ sudo systemctl status mongodb $ mongod --version Output db version v3.6.8 git version: 8e540c0b6db93ce994cc548f000900bdc740f80a OpenSSL version: OpenSSL 1.1.1f 31 Mar 2020 allocator: tcmalloc modules: none build environment: distarch: x86_64 target_arch: x86_64 https://aka.ms/mongodb-install-on-ubuntu
  • 7. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • Sample MongoDB connection test: Using MongoDB with Python: 2. Connection $ mongo --host 127.0.0.1:27017 > use admin; switched to db admin > db.createUser( { user: "administrator", pwd: "Pa55w.rd", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, { role: "clusterMonitor", db:"admin" }, "readWriteAnyDatabase" ] } ); Output Successfully added user: { "user" : "administrator", "roles" : [ { "role" : "userAdminAnyDatabase", "db" : "admin" }, { "role" : "clusterMonitor", "db" : "admin" }, "readWriteAnyDatabase" ] } > exit; https://aka.ms/mongodb-from-azure-cosmosdb Successfully added user: { "user" : "administrator", "roles" : [ { "role" : "userAdminAnyDatabase", "db" : "admin" }, { "role" : "clusterMonitor", "db" : "admin" }, "readWriteAnyDatabase" ] }
  • 8. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • Sample MongoDB connection test: Using MongoDB with Python: 3. New User $ mongo admin -u "administrator" -p "Pa55w.rd" --host 127.0.0.1:27017 > use DeviceData; switched to db DeviceData > db.createUser( { user: "deviceadmin", pwd: "Pa55w.rd", roles: [ { role: "readWrite", db: "DeviceData" } ] } ); Output Successfully added user: { "user" : "deviceadmin", "roles" : [ { "role" : "readWrite", "db" : "DeviceData" } ] } > exit; https://aka.ms/mongodb-from-azure-cosmosdb Successfully added user: { "user" : "deviceadmin", "roles" : [ { "role" : "readWrite", "db" : "DeviceData" } ] }
  • 9. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin Using MongoDB with Python: 4. Connection Test # GitHub Gist on https://bit.ly/mongodb-python-connection-test-sample $ wget -O mongodb-connection-test.py https://bit.ly/mongodb-python-connection-test-sample-raw $ python3 -m venv .venv $ source .venv/bin/activate $ pip install pymongo $ python mongodb-connection-test.py Enter your primary connection string: mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin Output {'allocator': 'tcmalloc', 'bits': 64, 'buildEnvironment': {'cc': 'cc: cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0', 'ccflags': '-fno-omit-frame-pointer -fno-strict-aliasing ' '-ggdb -pthread -Wall -Wsign-compare ‘ … https://bit.ly/mongodb-python-connection-test-sample
  • 10. [Open Source Programming] Data Store – NoSQL with Python: Getting Started • CRUD: Create, Retrieve, Update, and Delete Using MongoDB with Python: 5. CRUD w/ Flask $ git clone https://github.com/ianychoi/flask-mongodb.git $ cd flask-mongodb $ deactivate # if you were using another virtual environment $ python3 -m venv .venv $ source .venv/bin/activate $ pip install -r requirements.txt $ flask run --host=0.0.0.0 --port=8080 Enter your primary connection string: mongodb://administrator:Pa55w.rd@localhost:27017/?authSource=admin Output (example of an Azure Linux VM: 8080 port has been open through Azure Portal) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off Enter your primary connection string: * Running on all addresses (0.0.0.0) WARNING: This is a development server. Do not use it in a production deployment. * Running on http://127.0.0.1:8080 * Running on http://10.1.0.4:8080 (Press CTRL+C to quit) https://github.com/ianychoi/flask-mongodb
  • 11. [Open Source Programming] Data Store – NoSQL with Python: Getting Started Finished!