pys2-msgboxes
pys2-msgboxes is a module of pre-built messageboxes using the QMessageBox class from PySide2 library.
Installation
Use the package manager pip to install pys2-msgboxes.
pip install pys2-msgboxes
For now List of pre-built Messageboxes
- successful_msgbox()
- input_error_msgbox()
- information_msgbox()
- warning_msgbox() - Question Yes or No, return answer
- database_error_msgbox
- error_msgbox()
Usage
Each of the pre-built messageboxes take two arguments: title and text.
from pys2_msgboxes import msgboxes
# Execute Successful Messagebox
msgboxes.successful_msgbox('Successful', 'Operation Finished Successfully')
All the messageboxes Execute like above except warning_msgbox that return a answer of the user.
Question Messagebox (warning_msgbox)
from pys2_msgboxes import msgboxes
# importing the class MsgBox
from pys2_msgboxes.msgboxes import MsgBox
# This messagebox return the answer (Yes or No) of the user and saved in a variable
resp = msgboxes.warning_msgbox('Warning', 'Are your sure to perform this operation?')
# check which button (Yes or No) was pressed
if resp == MsgBox.Yes:
# Operation when Yes is pressed
print('"Yes" Button was pressed')
else:
# Otherwise
print('The "close" or "No" button was pressed')
Is not necessary to put the else stament if you are not going to do any action if the close or no Button is pressed.
License
Change Log
0.0.1 (02/02/2021)
- First Release
Metadata
Release files for pys2-msgboxes 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pys2-msgboxes-0.0.2.tar.gz | 15.0 kB | Without provenance | Details for pys2-msgboxes-0.0.2.tar.gz |
Release files / pys2-msgboxes-0.0.2.tar.gz
| Download URL | pys2-msgboxes-0.0.2.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13e32fc6bb187d14972afdb5b540cad140874501cc8b67a25fdff975473c77d4
|
|
BLAKE2b-256 checksum How to use checksums |
9c9b7c3c606f21c0e16019b62eb2891fdb4b3ffd22b2865a0999980ff2cb7007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|
Security for pys2-msgboxes 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.