Skip to main content

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

  1. Clone the repository:

    git clone https://github.com/yourusername/pySQLExport-gui.git
    cd pySQLExport-gui
    
  2. Install the dependencies:

    pip install -r requirements.txt
    
  3. Build the package:

    python setup.py sdist bdist_wheel
    
  4. Install the package locally:

    pip install .
    

Usage

After installation, you can start the application by running:

```sh
pySQLExport-gui
```

Connecting to a Database

  1. Database Type: Choose either MySQL or PostgreSQL from the dropdown menu.
  2. Server: Enter the database server address (e.g., localhost).
  3. Username: Enter the database username.
  4. Password: Enter the database password.
  5. Database: Enter the name of the database to connect to.
  6. Port: The port will automatically update based on the database type selected but can be manually adjusted if needed.
  7. Establish Connection: Click the Establish Connection button to connect to the database.

Running Queries

  1. SQL Query: Enter your SQL query in the provided text area.
  2. Execute Query: Click the Execute Query button to run the query. Results will be displayed in the table view.

Exporting Data

  1. Export Selection: Select the rows you wish to export, or choose to export all rows.
  2. Export Format: Choose the desired export format from the options available (CSV, JSON, HTML, XML, Excel).
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pySQLExport-gui-0.1.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pySQLExport_gui-0.1.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file pySQLExport-gui-0.1.0.tar.gz.

File metadata

  • Download URL: pySQLExport-gui-0.1.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for pySQLExport-gui-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec24de5f22bd84a008769ca386f4262ddff63f3e884db1f18c68652564430e24
MD5 03c1442dcc9f20122fdfff08151afe55
BLAKE2b-256 5e51eda77eb5a742cb14f9b797dcc40a2c7bd3006a8e137a57c8bc0d36a23882

See more details on using hashes here.

File details

Details for the file pySQLExport_gui-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pySQLExport_gui-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec01fac10b35aa1351c92703e257fd5b0382d1c49bc79566066d420a67be632
MD5 440259f75458e2108cc5b14f6e7d6334
BLAKE2b-256 d6cc3aa4cf30f0dda6ce7c0315b75879863baa31c5d33a8b294437f7bba19333

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page