Skip to content

Instantly share code, notes, and snippets.

View abhishek-shukla21's full-sized avatar
🏠
Working from home

Abhishek Shukla abhishek-shukla21

🏠
Working from home
View GitHub Profile
@abhishek-shukla21
abhishek-shukla21 / app.py
Created July 14, 2023 12:38
Flask Application with Database Connection and Authentication
from flask import Flask, render_template, request, redirect, session
from flask_sqlalchemy import SQLAlchemy
from werkzeug.security import generate_password_hash, check_password_hash
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'your_database_uri_here' # Replace with your database URI
app.config['SECRET_KEY'] = 'your_secret_key_here' # Replace with your secret key
db = SQLAlchemy(app)
@abhishek-shukla21
abhishek-shukla21 / send_email.py
Last active July 14, 2023 12:33
Send Email using Gmail SMTP in Python
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Set up your Gmail SMTP credentials
sender_email = 'YOUR_EMAIL'
sender_password = 'YOUR_PASSWORD'
# Set up the email details
recipient_email = 'RECIPIENT_EMAIL'