Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piyoki/mongodb
https://github.com/piyoki/mongodb
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/piyoki/mongodb
- Owner: piyoki
- Created: 2020-05-01T09:58:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T13:05:50.000Z (over 4 years ago)
- Last Synced: 2024-10-14T07:36:13.543Z (3 months ago)
- Language: Python
- Size: 1.42 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jetson-mongoDB-Atlas
MongoDB Atlas is a fully-managed cloud database developed by the same people that build MongoDB. Atlas handles all the complexity of deploying, managing, and healing your deployments on the cloud service provider of your choice (AWS, Azure, and GCP). You may use this service totally **FOR FREE**.
**Notes:** This software is written in Python. You may use this repo as a tool to constantly post data (ie: sensors data) from your device to your database hosted by MongoDB Atlas. If you have Python >=3.6 installed in your machine, you should be good to go. The demo below is done with a Jetson AGX Xavier DevKit. Other edge devices such as Raspberry Pi and Jetson Nano, or a normal Linux Desktop should also work.
Official Website: https://docs.atlas.mongodb.com/ \
Blog Post: https://hikariai.net## Demo
![](./demo_screenshots/001.png)
![](./demo_screenshots/002.png)## Setup
### Step #0: Register a MongoDB Atlas Account
- Go to MongoDB Atlas Login Page [here](https://account.mongodb.com/account/login), log in with a Google Account, or register a new one.
### Step #1: Create a cluster
- After you successfully log in with credentials, the window will lead you to choose a plan. Just Click the leftmost option **"Shared Cluster"**
- Choose a Cloud Provider and Region, then press **"Create Cluster"**### Step #3: Create a project
- On the very upper left corner, you will find a tab with **"Project 0"**, press **"New Project"**, create one with your own prefrence.
- Once the project has been created, you will find an option with **"Build a Cluster"**, follow the instructions in Step #1.
- Wait until the cluster has been succesfully created### Step #4: Create a database
- Find the tab with **"Cluster 0"**, and press it
- Find the tab with **"collections"**, and press it
- Press **"Add My Own Data"**
- Type a name for the database, and a name for the collection (instance of database)
- Press **"Create"**### Step #5: Build Connection
- Find the tab with **"Cluster"** on the left column, and press it
- Under **"Cluster 0"** section, you will find a tab named **"CONNECT"**, press it
- On the **"Whitelist a connection IP address"** tab, press **"Add Your Current IP Address"**
- On the **"Create a MongoDB User"** tab, type in a username and a password
- Press **"Choose a Connection Method"**, find the tab **"Connect your application"**, and press it
- From the **"Driver"** tab, choose **"Python"**, **"Version** **3.6 or later"**
- Copy the **"Conenction String", save it in a text file## How To Use
### Clone the Repo
```
$ cd ~
$ git clone https://github.com/yqbu/mongoDB
$ cd mongoDB
```### Install Software Dependencies
*** Please make sure you are using Python >=3.6
```
$ pip install -U pip
$ pip install -r requirement.txt
```### Run
#### Modify parameters in main.py
*** Modify the following parameters:
- URL = 'url'
- DATABASE_NAME ='db_name'
- COLLECTION_NAME = 'collection_name'#### Run the app
```
$ python main.py
```
db.help()
- Carefully read the descriptions in the console
- Call a specific function based on your need
- Customize post dataEnjoy!