A GUI application for exporting SQL query results into csv, json, xml, html, excel, and muck more.
Project description
pySQLExport-gui
Overview
pySQLExport-gui is a cross-platform graphical application designed to pull SQL data from MySQL and PostgreSQL databases and export it to various formats including CSV, JSON, HTML, XML, Excel, and more. Built using PyQt6, it provides an intuitive interface for managing database connections, running queries, and exporting data.
Features
- Cross-Platform: Runs on Windows, macOS, and Linux.
- Database Support: Connects to both MySQL and PostgreSQL databases.
- Data Export: Export query results to multiple formats including CSV, JSON, HTML, XML, and Excel.
- GUI: Easy-to-use graphical user interface built with PyQt6.
- Data Management: Support for appending data to existing results or replacing them, with options to handle duplicates.
Installation
Prerequisites
- Python 3.6 or higher
- Pip package manager
Installation Steps
pip install pySQLExport-gui
OR
-
Clone the repository:
git clone https://github.com/yourusername/pySQLExport-gui.git cd pySQLExport-gui
-
Install the dependencies:
pip install -r requirements.txt
-
Build the package:
python setup.py sdist bdist_wheel
-
Install the package locally:
pip install .
Usage
After installation, you can start the application by running:
```sh
pySQLExport-gui
```
Connecting to a Database
- Database Type: Choose either MySQL or PostgreSQL from the dropdown menu.
- Server: Enter the database server address (e.g.,
localhost). - Username: Enter the database username.
- Password: Enter the database password.
- Database: Enter the name of the database to connect to.
- Port: The port will automatically update based on the database type selected but can be manually adjusted if needed.
- Establish Connection: Click the
Establish Connectionbutton to connect to the database.
Running Queries
- SQL Query: Enter your SQL query in the provided text area.
- Execute Query: Click the
Execute Querybutton to run the query. Results will be displayed in the table view.
Exporting Data
- Export Selection: Select the rows you wish to export, or choose to export all rows.
- Export Format: Choose the desired export format from the options available (CSV, JSON, HTML, XML, Excel).
- Save File: A file dialog will prompt you to choose the save location.
Handling Duplicates
- Allow Duplicates: Use the checkbox to allow or disallow duplicate rows in your results.
- Open in New Tab: Use the checkbox to open query results in a new tab.
Dependencies
PyQt6: For the graphical user interface.mysql-connector-python: To connect to MySQL databases.psycopg2-binary: To connect to PostgreSQL databases.- 'pandas': To convert SQL to various data formats
Contributing
Contributions are welcome! Please fork the repository and submit pull requests for any features, bug fixes, or enhancements.
License
This project is licensed under the GNU General Public License v3 (GPLv3). See the LICENSE file for more details.
Acknowledgements
Special thanks to the open-source community for the tools and libraries that make this project possible.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pySQLExport-gui-1.0.tar.gz.
File metadata
- Download URL: pySQLExport-gui-1.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12bf6f13d43265e71b5ca1ac416c5ace8586ef130e0bd4c70d8220862bac487f
|
|
| MD5 |
b523065a0c3d1a620e526654d0cd41fa
|
|
| BLAKE2b-256 |
0bee30a15bff56cea82d38ce03623dc3997601c3ed53a26579c04a90ed54cb7d
|
File details
Details for the file pySQLExport_gui-1.0-py3-none-any.whl.
File metadata
- Download URL: pySQLExport_gui-1.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d23417ec3bb5d3889e547f1b623e3e3a5772ec59bbbbd836dce41f49f47d4d0
|
|
| MD5 |
2d67f0557c8c132229e2d404ea54833b
|
|
| BLAKE2b-256 |
0f9798c1235fcfde3e3db94dbdd784d8692218ae9b76cb82ecfaebb52b25e860
|