Metadata-Version: 2.4
Name: connect-mydb
Version: 0.1.0
Summary: A lightweight Python package that helps you connect to a MySQL database with a single line of code
Home-page: https://github.com/k3XD16/connect-mydb
Author: Mohamed Khasim
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mysql-connector-python
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# connnect_db 🔌

A lightweight Python package that helps you connect to a MySQL database with a **single line of code**.

No more boilerplate code — just call `connect()` and you're good to go!

---

## 🚀 Features

- 🔄 One-line MySQL connection
- 🔐 Supports host, user, password, database inputs
- ⚠️ Basic error handling
- 📦 Simple to use and integrate into any project

---

## 📦 Installation

You’ll need `mysql-connector-python`. Install it first:

```bash
pip install mysql-connector-python
```
Then install this package:

```bash
pip install connect-db
```

## 💻 Usage

```python
from connect-mydb import connect

try:
    db = connect('localhost', 'root', 'password', 'database_name')
    
    if db:
        cursor = db.cursor()
        cursor.execute("SHOW TABLES")
        for row in cursor.fetchall():
            print(row)

        cursor.close()
        db.close()

except Exception as e:
    print(f"❌ Error: {e}")

```


## 🙌 Author
Developed by [Mohamed Khasim](https://github.com/k3XD16)


Made with ❤️ for developers who hate repeating themselves.
