GithubHelp home page GithubHelp logo

check's Introduction

CHECK

A Customizable Checklist App

Currently Developed For: Command Line Interface

Set-Up

In order for the application to work you must have a 'db.py' file located in the Checklist directory. This file should connect you to a database. Currently, the application is set up for 5 tables/collections (users, checklists, checklistItems, items, categories). Your database should be set up to handle these 5 tables/collections.

You must have a variable for each of the tables/collections above (use the same name as indicated above). Finally you must have 5 functions:

updateC(table, object) table : table/collection variable object : class object for given type purpose : updates the corresponding object in the database returns : None

getC(table, id) table : table/collection variable id : object's id returns : dictionary form of class object

addC(table, object) table : table/collection variable object : class object for given type purpose : adds new object to table/collection in the database returns : Database's object id

clearTests() purpose : Deletes all entries in the databse with the attribute testing = False

findUser(userID) userID : 6-digit login id for a user returns : class object id for the user

Example (MongoDB - pymongo):

import pymongo as pm

#localhost
client = pm.MongoClient()

#checklist databse
db = client['checklist']

categories = db['categories']
items = db['items']
checklistItems = db['checklistItems']
checklists = db['checklists']
users = db['users']

def updateC(collection, obj):
    return collection.update({'id':obj.getId()}, vars(obj))

def getC(collection, id):
    return collection.find_one({"id" : id})

def addC(collection, obj):
    return collection.insert(vars(obj))

def clearTests(db):
    for collection in db.collection_names():
        print(db[collection].remove({'testing' : True}))

def findUser(userID):
    return users.find_one({'login':userID})['id']

To Start

Install the necessary packages pip install -r requirements.txt

Run the cli program python3 cli.py

check's People

Contributors

cpkurotori avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.