Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.6 KB

README.md

File metadata and controls

56 lines (35 loc) · 1.6 KB

PyMyDb (beta)

A simple python package that acts as wrapper over PyMySQL to simplify the usage of MySQL databases using functions instead of SQL Commands


Table of Contents

  1. Prerequisites
  2. Installation
  3. Usage
    1. Creating a Connection

Prerequisites

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:


Installation

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


Usage

Import PyMyDb to your project using: import pymydb

Creating a Connection

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.


Things to be done

  • Viewing tables
  • Add Exception Handling
  • Add support to export table as CSV
  • Create a complete documentation/wiki