首页 > 解决方案 > 用户名和密码数据库系统(不使用 MySQL)

问题描述

这是交易。我不想使用 mySQL,因为我觉得它可能只是我必须下载的更多内容。我下载了很多不同的模块,包括 pandas、openpyxl 等。

本质上,我想要实现的是一个数据库,我可以在一个程序上写入,而在另一个我想读取的程序上(比如注册和登录系统)。放学后我最近才重新开始编程。但是我想为我正在开发的网站做点什么。只是基本的实现。

到目前为止,我有这个;

#-------------
#Introduction |
#-------------

print('Hello, Welcome to the account creation service!')
print('\nI just need to ask a few questions to assign you a username')
print('\n\n','*' * 15)

#--------------
#Key questions |
#--------------

firstname=input('What is your first name?: ')
print('\n','*' * 15)
lastname=input('What is your last name?: ')
print('\n','*' * 15)
date=input('Write down your date of birth ddmmyy without slashes: ')

#------------------
#Username Creation |
#------------------

print('\n','*' * 15)

username=(firstname[0:2] + lastname[0:2] + date)

print('\n','*' * 15)
print('\nCreating your username...')
input('\nPress enter to uncover your username: ')
print('\nyour username is: ',username.upper())

#------------------
#Password Creation |
#------------------

print('\n\nYou now need to create a password.')
password=input('\nPlease set a password: ')
print('\n\nPASSWORD SET\n')


input('\nPress enter to leave this page: ')

#------------------------
#Database Implementation |
#------------------------

import openpyxl

from openpyxl import load_workbook

wb = load_workbook(filename = 'accountdatabase.xlxs')

标签: pythonexceldatabase

解决方案


推荐阅读