helpers.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:VTU-Result-Analyser 作者: abhijith0505 项目源码 文件源码
def getOneStudentJson(college_code='1mv',year='14',branch='is',regno=45):
    client = MongoClient()

    db = client.results

    students = db.students

    student = students.find_one({"usn" : (college_code + year
        +branch + str(regno).zfill(3)).upper()})

    if student:
        return dumps(student) #dumps is used to convert bson format of mongodb to json

    else :
        student = student_results(college_code,year,branch,regno)
        db.students.insert_one(student)
        return dumps(student)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号