github / github/codespaces-jupyter
screen
- 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
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