Skip to main content

No project description provided

Project description

🔐 Deepan Flask package for Auth & Contact

A lightweight and ready-to-use authentication and contact form module for Flask-based web applications — perfect for hackathons and rapid development. This package streamlines your development process by offering reusable logic and UI templates for:

  • ✅ Login
  • ✅ Registration
  • ✅ Contact Form
  • ✅ Profile Details

🚀 Features

  • Plug-and-play Flask routes and forms
  • Uses MongoDB for data storage
  • Passwords securely hashed using werkzeug.security
  • Stylish, responsive templates using pure HTML/CSS
  • Supports session management and flash messages

🧰 Technologies Used

  • Python (Flask)
  • MongoDB (pymongo)
  • Werkzeug for password hashing
  • HTML/CSS for frontend templates

📁 Folder Structure

your_project/
│
├── app.py                 # Main Flask application
├── templates/
│   ├── login.html         # (If using external templates)   ├── register.html         └── contact.html       
└── ...

How to use my package

1. Install Dependencies

pip install deepan_flask flask pymongo

2. Create app.py

Import the package:

from deepan_flask import (
    login_logic, register_logic, logout_logic, contact_logic,
    login_template, register_template, contact_template, profile_logic
)
from flask import Flask, redirect, url_for
from pymongo import MongoClient

3. Setup Flask and MongoDB in app.py:

app = Flask(__name__)

client = MongoClient('mongodb://localhost:27017/')

db = client['user_db']
users = db['users']
contacts = db['contacts']

4. Creating login,register, contact and profile route with new package code:

@app.route('/')
def home():
    return redirect(url_for('login'))

@app.route('/register', methods=['GET', 'POST'])
def register():
    return register_template(users, redirect_page='login')

@app.route('/login', methods=['GET', 'POST'])
def login():
    return login_template(users, redirect_page='profile')

@app.route('/contact',methods=['GET', 'POST'])
def contact():
    return contact_template(contacts)

@app.route('/profile')
def profile():
    return profile_logic()

@app.route('/logout')
def logout():
    return logout_logic()

if __name__ == '__main__':
    app.run(debug=True)

5. Run the app.py file:

python app.py

Usage Options:

You can use this package in two ways:

1. With Templates — Use *_template() functions for ready-to-use UIs.

2. With Logic Only — Use *_logic() functions to integrate with your custom templates.

Release Cycle

The latest version is released every weekend with improvements and fixes.

Happy Coding!

Crafted with ❤️ by Deepan Balu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepan_flask-0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepan_flask-0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file deepan_flask-0.2.tar.gz.

File metadata

  • Download URL: deepan_flask-0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for deepan_flask-0.2.tar.gz
Algorithm Hash digest
SHA256 7aef8528e6a5dba31dc60a1f46a1f43add9ad4ee75292bf73ba87fb0f930a634
MD5 da9b86c5e31139ed46ec9eecfc5fb5c9
BLAKE2b-256 10c4c8dcd0411b25be9147dec0ab686fd38f339444c807b112b8fd8f18f53342

See more details on using hashes here.

File details

Details for the file deepan_flask-0.2-py3-none-any.whl.

File metadata

  • Download URL: deepan_flask-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for deepan_flask-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d29f502f99cd3c2e8389b5d2203f5a3f400c40193afb07b90800bee6a2b0f31
MD5 59111405cd0b99290885a0a4765ec09d
BLAKE2b-256 4d99639c203c9920b28e49c8b3a94a48d482d701f5165b4c99c59e6dd3ba9000

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page