A simple python package that acts as wrapper over PyMySQL to simplify the usage of MySQL databases using functions instead of SQL Commands
This is a wrapper package that allows to use MySQL databases in your Python application. There you need to have the following already on your system:
- pip (This is the package installer to install the package)
- MySQL DBMS (Checkout Digital Ocean - How to install MySQL on Ubuntu)
- Python (Currently supports v2.70)
You can install PyMyDb using pip
as: pip install pymydb
This will install PyMyDb along with PyMySQL which it uses to interact with the database
Import PyMyDb to your project using: import pymydb
Connect to your database by creating an object of type pymydb.MySQL
:
connection = pymydb.MySQL(host='localhost', user='root', password='root')
This will create an object called connection that is connected to your MySQL Service but not yet connected to any database. Next we'll see how to use connection.use()
to connect to a database of your choice.
- Viewing tables
- Add Exception Handling
- Add support to export table as CSV
- Create a complete documentation/wiki