github / github/codespaces-jupyter

screen

Open
#657 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
894
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

import mysql.connector
from contextlib import contextmanager

DB_CONFIG = {
"host": "localhost",
"user": "root",
"password": "",
"database": "School_Fees_DB"
}

@contextmanager
def get_db():
conn = mysql.connector.connect(**DB_CONFIG)
cursor = conn.cursor(dictionary=True)
try:
yield cursor
conn.commit()
except Exception as e:
conn.rollback()
raise e
finally:
cursor.close()
conn.close()

Contributor guide

Open the contributing guide

Research direction

The issue contains only a code snippet and does not identify a repository file, test, failing behavior, or requested change. Clarify the intended outcome and provide reproduction steps before selecting an entry point or defining what done means.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, python
Domain
databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
5/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.