Name | eto-mysql-databaselib JSON |
Version |
1.1.5
JSON |
| download |
home_page | None |
Summary | A library with the sole purpose of making connections to mysql databases easier |
upload_time | 2024-04-27 13:09:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT License Copyright (c) 2024 Etozinhachan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
database
mysql
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# eto-mysql-databaselib
# OK SO MOST IMPORTANT THING, IF YOU WANNA USE THIS LIB YOU NEED TO HAVE A MYSQL DATABASE ONLINE,THEN, THE MOST IMPORTANT STUFF TO DO IS THIS ( IF YOU DON'T DO THIS AND TRY TO USE ANY OTHER THING IN THE PACKAGE, IT WILL NOT WORK, SINCE THE basemysqldatabaselib module IS THE BASE MODULE OF THE PROJECT, EVERYTHING DEPENDS ON IT ):
```py
def main():
from databaselib import basemysqldatabaselib, databaseAbstractions
basemysqldatabaselib.database = basemysqldatabaselib.Database("your host here", "your database username here", "your database password here", "your database name here")
basemysqldatabaselib.conn = basemysqldatabaselib.connect()
if __name__ == "__main__":
main()
```
## LIBRARY USAGE EXAMPLES
Register example
```py
from databaselib import basemysqldatabaselib, databaseAbstractions
from databaselib.databaseDevFriendlyAbstraction import User
def main():
basemysqldatabaselib.database = basemysqldatabaselib.Database("your host here", "your database username here", "your database password here", "your database name here")
basemysqldatabaselib.conn = basemysqldatabaselib.connect()
username:str = input("Insert your username: ")
password:str = input("Insert your password: ")
user:User = databaseAbstractions.registerUser(username, password)
if user == None:
print("User with that username already exists!")
return
print(user)
if __name__ == "__main__":
main()
```
Login example
```py
from databaselib import basemysqldatabaselib, databaseAbstractions
from databaselib.databaseDevFriendlyAbstraction import User
def main():
basemysqldatabaselib.database = basemysqldatabaselib.Database("your host here", "your database username here", "your database password here", "your database name here")
basemysqldatabaselib.conn = basemysqldatabaselib.connect()
username:str = input("Insert your username: ")
password:str = input("Insert your password: ")
user:User = databaseAbstractions.loginUser(username, password)
if user == None:
print("Wrong password!")
return
print(user)
if __name__ == "__main__":
main()
```
User edit example
```py
from databaselib import basemysqldatabaselib, databaseAbstractions
from databaselib.databaseDevFriendlyAbstraction import User
def main():
basemysqldatabaselib.database = basemysqldatabaselib.Database("your host here", "your database username here", "your database password here", "your database name here")
basemysqldatabaselib.conn = basemysqldatabaselib.connect()
username:str = input("Insert your username: ")
password:str = input("Insert your password: ")
user:User = databaseAbstractions.loginUser(username, password)
if user == None:
print("Wrong password!")
return
print(user)
new_username:str = input("Insert your new username")
new_password:str = input("Insert your new password")
# edits both the username and the password
edited_user = databaseAbstractions.editUser(user, new_username, new_password)
if edited_user == None:
print("Something went wrong while editing the user!")
return
print(edited_user)
# only edits the username
#edited_user = databaseAbstractions.editUser(user, new_username=new_username)
# only edits the password
#edited_user = databaseAbstractions.editUser(user, new_password=new_password)
if __name__ == "__main__":
main()
```
OR
```py
from databaselib import basemysqldatabaselib, databaseAbstractions
from databaselib.databaseDevFriendlyAbstraction import User
def main():
basemysqldatabaselib.database = basemysqldatabaselib.Database("your host here", "your database username here", "your database password here", "your database name here")
basemysqldatabaselib.conn = basemysqldatabaselib.connect()
username:str = input("Insert your username: ")
password:str = input("Insert your password: ")
user:User = databaseAbstractions.loginUser(username, password)
if user == None:
print("Wrong password!")
return
print(user)
new_username:str = input("Insert your new username ( it needs to be different than the current one ): ")
new_password:str = input("Insert your new password ( it needs to be different than the current one ): ")
# edits the username
user.username = new_username
if new_username == username:
print("Something went wrong while editing the user's username!")
return
# edits the password
user.password = new_password
if new_password == password:
print("Something went wrong while editing the user's password!")
return
print(user)
if __name__ == "__main__":
main()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "eto-mysql-databaselib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "database, mysql",
"author": null,
"author_email": "Eto_chan <etochandev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c1/30/4784fc0bf4f1234828a086acf0ac2906ab6edddb21d08bc9d02c10a36dfc/eto_mysql_databaselib-1.1.5.tar.gz",
"platform": null,
"description": "# eto-mysql-databaselib\r\n\r\n# OK SO MOST IMPORTANT THING, IF YOU WANNA USE THIS LIB YOU NEED TO HAVE A MYSQL DATABASE ONLINE,THEN, THE MOST IMPORTANT STUFF TO DO IS THIS ( IF YOU DON'T DO THIS AND TRY TO USE ANY OTHER THING IN THE PACKAGE, IT WILL NOT WORK, SINCE THE basemysqldatabaselib module IS THE BASE MODULE OF THE PROJECT, EVERYTHING DEPENDS ON IT ):\r\n\r\n\r\n```py\r\ndef main():\r\n from databaselib import basemysqldatabaselib, databaseAbstractions\r\n\r\n basemysqldatabaselib.database = basemysqldatabaselib.Database(\"your host here\", \"your database username here\", \"your database password here\", \"your database name here\")\r\n basemysqldatabaselib.conn = basemysqldatabaselib.connect()\r\n \r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```\r\n\r\n\r\n## LIBRARY USAGE EXAMPLES\r\n\r\nRegister example\r\n\r\n```py\r\n\r\nfrom databaselib import basemysqldatabaselib, databaseAbstractions\r\nfrom databaselib.databaseDevFriendlyAbstraction import User\r\n\r\ndef main():\r\n \r\n basemysqldatabaselib.database = basemysqldatabaselib.Database(\"your host here\", \"your database username here\", \"your database password here\", \"your database name here\")\r\n basemysqldatabaselib.conn = basemysqldatabaselib.connect()\r\n \r\n username:str = input(\"Insert your username: \")\r\n password:str = input(\"Insert your password: \")\r\n \r\n user:User = databaseAbstractions.registerUser(username, password)\r\n \r\n if user == None:\r\n print(\"User with that username already exists!\")\r\n return\r\n \r\n print(user)\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```\r\n\r\nLogin example\r\n\r\n```py\r\n\r\nfrom databaselib import basemysqldatabaselib, databaseAbstractions\r\nfrom databaselib.databaseDevFriendlyAbstraction import User\r\n\r\ndef main(): \r\n\r\n basemysqldatabaselib.database = basemysqldatabaselib.Database(\"your host here\", \"your database username here\", \"your database password here\", \"your database name here\")\r\n basemysqldatabaselib.conn = basemysqldatabaselib.connect()\r\n \r\n username:str = input(\"Insert your username: \")\r\n password:str = input(\"Insert your password: \")\r\n \r\n user:User = databaseAbstractions.loginUser(username, password)\r\n \r\n if user == None:\r\n print(\"Wrong password!\")\r\n return\r\n \r\n print(user)\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n\r\n```\r\n\r\nUser edit example\r\n\r\n```py\r\n \r\nfrom databaselib import basemysqldatabaselib, databaseAbstractions\r\nfrom databaselib.databaseDevFriendlyAbstraction import User\r\n\r\ndef main():\r\n basemysqldatabaselib.database = basemysqldatabaselib.Database(\"your host here\", \"your database username here\", \"your database password here\", \"your database name here\")\r\n basemysqldatabaselib.conn = basemysqldatabaselib.connect()\r\n \r\n username:str = input(\"Insert your username: \")\r\n password:str = input(\"Insert your password: \")\r\n \r\n user:User = databaseAbstractions.loginUser(username, password)\r\n \r\n if user == None:\r\n print(\"Wrong password!\")\r\n return\r\n \r\n print(user)\r\n\r\n new_username:str = input(\"Insert your new username\")\r\n new_password:str = input(\"Insert your new password\")\r\n\r\n # edits both the username and the password\r\n edited_user = databaseAbstractions.editUser(user, new_username, new_password)\r\n\r\n if edited_user == None:\r\n print(\"Something went wrong while editing the user!\")\r\n return\r\n \r\n print(edited_user)\r\n # only edits the username\r\n #edited_user = databaseAbstractions.editUser(user, new_username=new_username)\r\n \r\n # only edits the password\r\n #edited_user = databaseAbstractions.editUser(user, new_password=new_password)\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n```\r\n\r\nOR\r\n\r\n```py\r\n\r\nfrom databaselib import basemysqldatabaselib, databaseAbstractions\r\nfrom databaselib.databaseDevFriendlyAbstraction import User\r\n\r\ndef main():\r\n basemysqldatabaselib.database = basemysqldatabaselib.Database(\"your host here\", \"your database username here\", \"your database password here\", \"your database name here\")\r\n basemysqldatabaselib.conn = basemysqldatabaselib.connect()\r\n \r\n username:str = input(\"Insert your username: \")\r\n password:str = input(\"Insert your password: \")\r\n \r\n user:User = databaseAbstractions.loginUser(username, password)\r\n \r\n if user == None:\r\n print(\"Wrong password!\")\r\n return\r\n \r\n print(user)\r\n\r\n new_username:str = input(\"Insert your new username ( it needs to be different than the current one ): \")\r\n new_password:str = input(\"Insert your new password ( it needs to be different than the current one ): \")\r\n\r\n # edits the username\r\n user.username = new_username\r\n\r\n if new_username == username:\r\n print(\"Something went wrong while editing the user's username!\")\r\n return\r\n\r\n # edits the password\r\n user.password = new_password\r\n\r\n if new_password == password:\r\n print(\"Something went wrong while editing the user's password!\")\r\n return\r\n \r\n print(user)\r\nif __name__ == \"__main__\":\r\n main()\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Etozinhachan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A library with the sole purpose of making connections to mysql databases easier",
"version": "1.1.5",
"project_urls": {
"Homepage": "https://github.com/Etozinhachan/eto-mysql-databaselib"
},
"split_keywords": [
"database",
" mysql"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7aeed5d1747b28c46a06bdab92fb1b063314002f8415deb0971224cdf2bd0ac9",
"md5": "5b3e3f2c1a22e9f981b34e9d76546b85",
"sha256": "dbd438e9c9abb83ffba61def0d01bf65a11e1369e4f135fe2ade74bd9430e9b4"
},
"downloads": -1,
"filename": "eto_mysql_databaselib-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5b3e3f2c1a22e9f981b34e9d76546b85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 8462,
"upload_time": "2024-04-27T13:09:16",
"upload_time_iso_8601": "2024-04-27T13:09:16.257229Z",
"url": "https://files.pythonhosted.org/packages/7a/ee/d5d1747b28c46a06bdab92fb1b063314002f8415deb0971224cdf2bd0ac9/eto_mysql_databaselib-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c1304784fc0bf4f1234828a086acf0ac2906ab6edddb21d08bc9d02c10a36dfc",
"md5": "e7c5b3622307b68a89f5b73b84658d22",
"sha256": "156860033e29a62451c21d26239817002aa6e0fd04b1dd3d9872775c4ce95784"
},
"downloads": -1,
"filename": "eto_mysql_databaselib-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "e7c5b3622307b68a89f5b73b84658d22",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 8494,
"upload_time": "2024-04-27T13:09:20",
"upload_time_iso_8601": "2024-04-27T13:09:20.165098Z",
"url": "https://files.pythonhosted.org/packages/c1/30/4784fc0bf4f1234828a086acf0ac2906ab6edddb21d08bc9d02c10a36dfc/eto_mysql_databaselib-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-27 13:09:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Etozinhachan",
"github_project": "eto-mysql-databaselib",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "eto-mysql-databaselib"
}