| Name | PyGUIBuilder JSON |
| Version |
1.5
JSON |
| download |
| home_page | https://github.com/ArtemP36/PyGUIBuilder |
| Summary | A simple library for creating GUI applications |
| upload_time | 2024-09-01 08:03:23 |
| maintainer | None |
| docs_url | None |
| author | Artem Panov |
| requires_python | >=3.10 |
| license | MIT License Copyright (c) 2024 Artem Panov 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 |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# PyGUIBuilder - README
## Overview
Welcome to the **PyGUIBuilder**, designed to help you create GUI applications with ease. Whether you are building a simple tool or a complex application, our library provides everything you need.
## Table of Contents
1. [Installation](#installation)
2. [Getting Started](#getting-started)
3. [Features](#features)
4. [Usage](#usage)
- [Creating a Window](#creating-a-window)
- [Adding Widgets](#adding-widgets)
- [Other Functions](#other-functions)
5. [Examples](#examples)
6. [License](#license)
7. [Thanks](#thanks)
## Installation
To install the PyGUIBuilder, use pip:
```bash
pip install PyGUIBuilder
```
## Getting Started
Creating your first GUI application is simple. Here’s a quick example to get you started:
```python
import PyGUIBuilder
# Create the main application window
app = PyGUIBuilder.createWindow("My First App", "icon.ico", 400, 400)
# Create a label widget
label = PyGUIBuilder.createLabel(app, "Hello, World!", 1, 0)
# Run the application
PyGUIBuilder.run()
```
## Features
- **Works on Windows**
- **Ease of use:** The library provides a simple and intuitive interface for creating GUI elements.
- **Widgets:** Buttons, labels, text entries, buttons, radio buttons and many others.
- **Grid placement:** placing widgets in rows and columns.
- **Alerts and Warnings:** Simple dialog boxes for messages and warnings.
## Usage
### Creating a Window
To create a main application window, use the CreateWindow function:
```python
import PyGUIBuilder
window = PyGUIBuilder.createWindow("My App", "icon.ico", 400, 400)
```
### Adding Widgets
Widgets are the building blocks of a GUI application. You can add various widgets to your window.
Here's an example of adding a label:
```python
label = PyGUIBuilder.createLabel(window, "Hello, World!", 1, 0)
```
Here's an example of adding a entrybox:
```python
entry = PyGUIBuilder.createEntry(window, "text", 3, 0)
```
Here's an example of adding a button:
```python
def callback():
print("Button clicked!")
button = PyGUIBuilder.createButton(window, "Click Me!", callback, 2, 0)
```
Here's an example of adding a combobox:
```python
langs = ["1", "2", "3", "4"]
combobox = PyGUIBuilder.createComboBox(window, langs, 1, 0)
```
Here's an example of messagebox:
```python
PyGUIBuilder.showMessageBox("showinfo", "Information", "This is an info message.")
PyGUIBuilder.showMessageBox("showwarning", "Warning", "This is a warning message.")
PyGUIBuilder.showMessageBox("showerror", "Error", "This is an error message.")
PyGUIBuilder.showMessageBox("askquestion", "Question", "Are you sure?")
PyGUIBuilder.showMessageBox("askokcancel", "OK Cancel", "Do you want to continue?")
PyGUIBuilder.showMessageBox("askyesno", "Yes No", "Do you agree?")
PyGUIBuilder.showMessageBox("askretrycancel", "Retry Cancel", "Do you want to retry?")
```
Here's an example of adding a Checkbox:
```python
PyGUIBuilder.createCheckbox(window, "text", 1, 0)
```
Here's an example of adding a RadioButton:
```python
PyGUIBuilder.createRadioButton(window, "text", 1, 0)
```
### Other Functions:
Clearing text in an entry box:
```python
PyGUIBuilder.clearText(entry)
```
Setting text in an entry box:
```python
PyGUIBuilder.setText(entry, "text")
```
Getting text from an entry box:
```python
PyGUIBuilder.getText(entry)
```
Destroying an element:
```python
PyGUIBuilder.destroyElement(label)
```
Getting selection on Combobox:
```python
print(PyGUIBuilder.getComboBoxSelection(combobox))
```
Getting Checkbox state:
```python
PyGUIBuilder.getCheckbox()
```
Getting RadioButton state:
```python
PyGUIBuilder.getRadioButton()
```
Running the application:
```python
PyGUIBuilder.run()
```
## Examples
### Simple Form
```python
import PyGUIBuilder
def on_submit():
r = PyGUIBuilder.getCheckbox(Robot)
if r == 1:
check = "Not a robot"
else:
check = "Robot"
print(f"First Name: {PyGUIBuilder.getText(e_firstname)}, Last Name: {PyGUIBuilder.getText(e_lastname)}, Age: {PyGUIBuilder.getText(e_age)}, EMAIL: {PyGUIBuilder.getText(e_email)}, Phone number: {PyGUIBuilder.getText(e_phone_number)}, Password: {PyGUIBuilder.getText(e_password)}, {check}")
app = PyGUIBuilder.createWindow("Simple Form", "icon.ico", 400, 400)
l_firstname = PyGUIBuilder.createLabel(app, "First Name:", 1, 0)
e_firstname = PyGUIBuilder.createEntry(app, "", 1, 1)
l_lastname = PyGUIBuilder.createLabel(app, "Last Name:", 2, 0)
e_lastname = PyGUIBuilder.createEntry(app, "", 2, 1)
l_age = PyGUIBuilder.createLabel(app, "Age:", 3, 0)
e_age = PyGUIBuilder.createEntry(app, "", 3, 1)
l_email = PyGUIBuilder.createLabel(app, "EMAIL:", 4, 0)
e_email = PyGUIBuilder.createEntry(app, "", 4, 1)
l_phone_number = PyGUIBuilder.createLabel(app, "Phone number:", 5, 0)
e_phone_number = PyGUIBuilder.createEntry(app, "", 5, 1)
l_password = PyGUIBuilder.createLabel(app, "Password:", 6, 0)
e_password = PyGUIBuilder.createEntry(app, "", 6, 1)
Robot = PyGUIBuilder.createCheckbox(app, "I am not a robot", 8, 0)
submit_button = PyGUIBuilder.createButton(app, "Submit", on_submit, 9, 0)
PyGUIBuilder.run()
```
## License
This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
## Thanks
Thank you for using the PyGUIBuilder! We hope it helps you build amazing applications. If you have questions or need additional help, feel free to contact panovartem690@gmail.com.
---
Please keep in mind that there may be bugs and flaws.
Raw data
{
"_id": null,
"home_page": "https://github.com/ArtemP36/PyGUIBuilder",
"name": "PyGUIBuilder",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Artem Panov",
"author_email": "panovartem690@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/af/20/48a4bbb46defa817e59be266a5051838df186061fc56787300c5c1e8a122/pyguibuilder-1.5.tar.gz",
"platform": null,
"description": "# PyGUIBuilder - README\r\n\r\n## Overview\r\n\r\nWelcome to the **PyGUIBuilder**, designed to help you create GUI applications with ease. Whether you are building a simple tool or a complex application, our library provides everything you need.\r\n\r\n## Table of Contents\r\n\r\n1. [Installation](#installation)\r\n2. [Getting Started](#getting-started)\r\n3. [Features](#features)\r\n4. [Usage](#usage)\r\n - [Creating a Window](#creating-a-window)\r\n - [Adding Widgets](#adding-widgets)\r\n - [Other Functions](#other-functions)\r\n5. [Examples](#examples)\r\n6. [License](#license)\r\n7. [Thanks](#thanks)\r\n\r\n## Installation\r\n\r\nTo install the PyGUIBuilder, use pip:\r\n\r\n```bash\r\npip install PyGUIBuilder\r\n```\r\n\r\n## Getting Started\r\n\r\nCreating your first GUI application is simple. Here\u2019s a quick example to get you started:\r\n\r\n```python\r\nimport PyGUIBuilder\r\n\r\n# Create the main application window\r\napp = PyGUIBuilder.createWindow(\"My First App\", \"icon.ico\", 400, 400)\r\n\r\n# Create a label widget\r\nlabel = PyGUIBuilder.createLabel(app, \"Hello, World!\", 1, 0)\r\n\r\n# Run the application\r\nPyGUIBuilder.run()\r\n```\r\n\r\n## Features\r\n\r\n- **Works on Windows**\r\n- **Ease of use:** The library provides a simple and intuitive interface for creating GUI elements.\r\n- **Widgets:** Buttons, labels, text entries, buttons, radio buttons and many others.\r\n- **Grid placement:** placing widgets in rows and columns.\r\n- **Alerts and Warnings:** Simple dialog boxes for messages and warnings.\r\n\r\n## Usage\r\n\r\n### Creating a Window\r\n\r\nTo create a main application window, use the CreateWindow function:\r\n\r\n```python\r\nimport PyGUIBuilder\r\n\r\nwindow = PyGUIBuilder.createWindow(\"My App\", \"icon.ico\", 400, 400)\r\n```\r\n\r\n### Adding Widgets\r\n\r\nWidgets are the building blocks of a GUI application. You can add various widgets to your window.\r\n\r\nHere's an example of adding a label:\r\n```python\r\nlabel = PyGUIBuilder.createLabel(window, \"Hello, World!\", 1, 0)\r\n```\r\nHere's an example of adding a entrybox:\r\n```python\r\nentry = PyGUIBuilder.createEntry(window, \"text\", 3, 0)\r\n```\r\nHere's an example of adding a button:\r\n```python\r\ndef callback():\r\n print(\"Button clicked!\")\r\n\r\nbutton = PyGUIBuilder.createButton(window, \"Click Me!\", callback, 2, 0)\r\n```\r\nHere's an example of adding a combobox:\r\n```python\r\nlangs = [\"1\", \"2\", \"3\", \"4\"]\r\ncombobox = PyGUIBuilder.createComboBox(window, langs, 1, 0)\r\n```\r\nHere's an example of messagebox:\r\n```python\r\nPyGUIBuilder.showMessageBox(\"showinfo\", \"Information\", \"This is an info message.\")\r\nPyGUIBuilder.showMessageBox(\"showwarning\", \"Warning\", \"This is a warning message.\")\r\nPyGUIBuilder.showMessageBox(\"showerror\", \"Error\", \"This is an error message.\")\r\nPyGUIBuilder.showMessageBox(\"askquestion\", \"Question\", \"Are you sure?\")\r\nPyGUIBuilder.showMessageBox(\"askokcancel\", \"OK Cancel\", \"Do you want to continue?\")\r\nPyGUIBuilder.showMessageBox(\"askyesno\", \"Yes No\", \"Do you agree?\")\r\nPyGUIBuilder.showMessageBox(\"askretrycancel\", \"Retry Cancel\", \"Do you want to retry?\")\r\n```\r\nHere's an example of adding a Checkbox:\r\n```python\r\nPyGUIBuilder.createCheckbox(window, \"text\", 1, 0)\r\n```\r\nHere's an example of adding a RadioButton:\r\n```python\r\nPyGUIBuilder.createRadioButton(window, \"text\", 1, 0)\r\n```\r\n### Other Functions:\r\nClearing text in an entry box:\r\n```python\r\nPyGUIBuilder.clearText(entry)\r\n```\r\nSetting text in an entry box:\r\n```python\r\nPyGUIBuilder.setText(entry, \"text\")\r\n```\r\nGetting text from an entry box:\r\n```python\r\nPyGUIBuilder.getText(entry)\r\n```\r\nDestroying an element:\r\n```python\r\nPyGUIBuilder.destroyElement(label)\r\n```\r\nGetting selection on Combobox:\r\n```python\r\nprint(PyGUIBuilder.getComboBoxSelection(combobox))\r\n```\r\nGetting Checkbox state:\r\n```python\r\nPyGUIBuilder.getCheckbox()\r\n```\r\nGetting RadioButton state:\r\n```python\r\nPyGUIBuilder.getRadioButton()\r\n```\r\nRunning the application:\r\n```python\r\nPyGUIBuilder.run()\r\n```\r\n## Examples\r\n\r\n### Simple Form\r\n\r\n```python\r\nimport PyGUIBuilder\r\n\r\ndef on_submit():\r\n r = PyGUIBuilder.getCheckbox(Robot)\r\n if r == 1:\r\n check = \"Not a robot\"\r\n else:\r\n check = \"Robot\"\r\n print(f\"First Name: {PyGUIBuilder.getText(e_firstname)}, Last Name: {PyGUIBuilder.getText(e_lastname)}, Age: {PyGUIBuilder.getText(e_age)}, EMAIL: {PyGUIBuilder.getText(e_email)}, Phone number: {PyGUIBuilder.getText(e_phone_number)}, Password: {PyGUIBuilder.getText(e_password)}, {check}\")\r\n\r\napp = PyGUIBuilder.createWindow(\"Simple Form\", \"icon.ico\", 400, 400)\r\n\r\nl_firstname = PyGUIBuilder.createLabel(app, \"First Name:\", 1, 0)\r\ne_firstname = PyGUIBuilder.createEntry(app, \"\", 1, 1)\r\n\r\nl_lastname = PyGUIBuilder.createLabel(app, \"Last Name:\", 2, 0)\r\ne_lastname = PyGUIBuilder.createEntry(app, \"\", 2, 1)\r\n\r\nl_age = PyGUIBuilder.createLabel(app, \"Age:\", 3, 0)\r\ne_age = PyGUIBuilder.createEntry(app, \"\", 3, 1)\r\n\r\nl_email = PyGUIBuilder.createLabel(app, \"EMAIL:\", 4, 0)\r\ne_email = PyGUIBuilder.createEntry(app, \"\", 4, 1)\r\n\r\nl_phone_number = PyGUIBuilder.createLabel(app, \"Phone number:\", 5, 0)\r\ne_phone_number = PyGUIBuilder.createEntry(app, \"\", 5, 1)\r\n\r\nl_password = PyGUIBuilder.createLabel(app, \"Password:\", 6, 0)\r\ne_password = PyGUIBuilder.createEntry(app, \"\", 6, 1)\r\n\r\nRobot = PyGUIBuilder.createCheckbox(app, \"I am not a robot\", 8, 0)\r\n\r\nsubmit_button = PyGUIBuilder.createButton(app, \"Submit\", on_submit, 9, 0)\r\n\r\nPyGUIBuilder.run()\r\n```\r\n\r\n## License\r\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\r\n\r\n## Thanks\r\nThank you for using the PyGUIBuilder! We hope it helps you build amazing applications. If you have questions or need additional help, feel free to contact panovartem690@gmail.com.\r\n\r\n---\r\nPlease keep in mind that there may be bugs and flaws. \r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Artem Panov 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 simple library for creating GUI applications",
"version": "1.5",
"project_urls": {
"Homepage": "https://github.com/ArtemP36/PyGUIBuilder"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e69ee47becac8e92caa51d508e72af980bb8e276720c6bd498dedd00b15b52c7",
"md5": "1f867e9581d60bbd0103a2e5a3e8ee23",
"sha256": "4945b448b49056041e935274c7022c3955d72858a1ee820fed7cd31c791edffc"
},
"downloads": -1,
"filename": "PyGUIBuilder-1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1f867e9581d60bbd0103a2e5a3e8ee23",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 41149,
"upload_time": "2024-09-01T08:03:21",
"upload_time_iso_8601": "2024-09-01T08:03:21.393732Z",
"url": "https://files.pythonhosted.org/packages/e6/9e/e47becac8e92caa51d508e72af980bb8e276720c6bd498dedd00b15b52c7/PyGUIBuilder-1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "af2048a4bbb46defa817e59be266a5051838df186061fc56787300c5c1e8a122",
"md5": "45a4792148515832919f0294494644fe",
"sha256": "7951856235cfdb554d5b68c1c297c57ce77f517e4fe8abf8230dabc0d83806d1"
},
"downloads": -1,
"filename": "pyguibuilder-1.5.tar.gz",
"has_sig": false,
"md5_digest": "45a4792148515832919f0294494644fe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 42907,
"upload_time": "2024-09-01T08:03:23",
"upload_time_iso_8601": "2024-09-01T08:03:23.039576Z",
"url": "https://files.pythonhosted.org/packages/af/20/48a4bbb46defa817e59be266a5051838df186061fc56787300c5c1e8a122/pyguibuilder-1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-01 08:03:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ArtemP36",
"github_project": "PyGUIBuilder",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyguibuilder"
}