A modular login system
Project description
# MTLBS
Modular Template Login System
Getting Started
How to install?
To install the module using pip use the following command.
pip install mtlbs
Alternatively download the latest release of mtlbs on github
<Latest Release>
: https://github.com/LofteaO/MTLBS/releases
How to use?
Import the module into your main application file
app.py
1. #imports
2. import mtlbs as mtl
Specifiy the template file location
.mt or .amt files are the only supported file format
1. #value of the template variable should be the path to the template file
2. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
Refrence Code
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
Create variables for build, link & pull
Assign the link, build & pull variables for ease of use
1. link = mtlbs.link
2. build = mtlbs.build
3. pull = mtlbs.credentials.pull
Refrence Code
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
6.
7. link = mtl.link
8. build = mtl.build
9. pull = mtl.credentials.pull
this step is not required*
Specify the where the data will be stored/retrieved from locally or from a database
Locally:
The code required to locally store/retrieve data is the following.
link.local(path=None)
The link.local represents the choice of storing/retrieving the data locally and if the path is set to None The data will be stored and retrieved by default from the AppData directory of the current User Disclaimer* IT IS ADVISED TO SET A PATH AS BY DEFAULT IT WILL ONLY WORK ON WINDOWS AND WILL BREAK ON NON-WINDOWS OPERATING SYSTEMS
Refrence Code
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
6.
7. link = mtl.link
8. build = mtl.build
9. pull = mtl.credentials.pull
10.
11. link.local(path=None)
With MDL-Api:
MDL api is a api made for mtlbs to link mtlbs to a database of your choice. MDL api is the only officially supported way to link mtlbs to a database without directly changing the code of mtlbs.
Refrence Code
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
6.
7. link = mtl.link
8. build = mtl.build
9. pull = mtl.credentials.pull
10.
11. link.local(path=None)
Build the template
Code to build the template Note* the template var in the build call is the path to the template file
build(template)
Refrence Code
The build class must be called after the link class
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
6.
7. link = mtl.link
8. build = mtl.build
9. pull = mtl.credentials.pull
10.
10. link.local(path=None)
11. build(template)
How to retrieve user data
Use the assigned pull class to retreive user data after the login process is complete
1. username = pull.username()
2. password = pull.password()
3. uuid = pull.uuid()
4.
5. #The print is only for debug purposed and is not needed
6. print(f"The username is: {username}\nThe password is {password}\nThe UUID is: {uuid}")
Refrence Code
1. #imports
2. import mtlbs as mtl
3.
4. #value of the template variable should be the path to the template file
5. template = "C:/Users/joshu/Desktop/Modular Login Sysmtem -Kivy/Betas/beta 1.0/test.mt"
6.
7. link = mtl.link
8. build = mtl.build
9. pull = mtl.credentials.pull
10.
10. link.local(path=None)
11. build(template)
12.
13. username = pull.username()
14. password = pull.password()
15. uuid = pull.uuid()
16.
17. print(f"The username is: {username}\nThe password is {password}\nThe UUID is: {uuid}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mtlbs-0.0.6.tar.gz
.
File metadata
- Download URL: mtlbs-0.0.6.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20b88ef1560fb1334a4510b27425f865f9d633d85f6fc5ec37a08fb300d90977 |
|
MD5 | a46da0389b53af2573dcaa0d1b42df2d |
|
BLAKE2b-256 | 2c37f396f692b64c5de5f0e9d4fc5b609dbccc7a425756d8e1d8d4da8c87f210 |
File details
Details for the file mtlbs-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: mtlbs-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84441f46eb3cc7a81a7d3ea81a1bfd50da2249ef092e456eb82c454f4100fb9b |
|
MD5 | 03650410c316a4d0d4db4f7bdaf40327 |
|
BLAKE2b-256 | 2b36054cab8e3e0ede57b9bec1ee975893420f8cbfe2eac4f50458266fea14db |