Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Small and simple example projects for Python

License

NotificationsYou must be signed in to change notification settings

Efeckc17/simple-example-projects-in-Python

Repository files navigation

PythonLicenseStarsForksIssuesLast Commit

Collection of simple Python projects for learning and practice.

📋 Projects Overview

ProjectTechnologiesDifficultyDescriptionJump to
🧮CalculatorCLI, Tkinter, Flask, HTML/CSS/JS⭐⭐ BeginnerMulti-platform calculator with different interfacesDetails
🔐Password GeneratorCLI, Tkinter, Clipboard API⭐⭐ BeginnerSecure password generation with customizable optionsDetails
🎮Number Guessing GameCLI, Tkinter, Game Logic⭐ EasyInteractive guessing game with multiple difficulty levelsDetails
📝TODO AppSQLite, CLI, Tkinter, CRUD⭐⭐⭐ IntermediateTask management with database operationsDetails
🌐Speed TestNetwork API, Threading, Progress⭐⭐⭐ IntermediateInternet speed testing with real-time updatesDetails
🎨ASCII Art GeneratorImage Processing, CLI, File I/O⭐⭐ BeginnerConvert text and images to ASCII artDetails
👤User Management APIFlask API, JWT, SQLite, Full-Stack , HTML/CSS/JS⭐⭐⭐⭐ AdvancedComplete API with authentication and frontendDetails

📁 Project Details

🧮 Calculator

A calculator implemented in three different ways:

  • CLI - Command line interface
  • GUI - Desktop app with Tkinter
  • Web - Flask web application

Run the projects:

# CLI Calculatorcd calculator/clipython calculator.py# GUI Calculatorcd calculator/tkinterpython calculator_gui.py# Web Calculatorcd calculator/webpip install -r requirements.txtpython app.py# Open: http://localhost:5000

🔐 Password Generator

A secure password generator implemented in two different ways:

  • CLI - Command line interface with interactive mode
  • GUI - Desktop app with Tkinter and modern interface

Features:

  • Customizable password length (8-128 characters)
  • Character type selection (uppercase, digits, symbols)
  • Exclude ambiguous characters option
  • Password strength analysis
  • Multiple password generation
  • Clipboard integration (GUI version)

Run the projects:

# CLI Password Generatorcd password-generator/clipython password_gen.py# Interactive modepython password_gen.py -i# GUI Password Generatorcd password-generator/guipip install -r requirements.txtpython password_gui.py

🎮 Number Guessing Game

A fun guessing game implemented in two different ways:

  • CLI - Command line interface with interactive menu
  • GUI - Desktop app with modern Tkinter interface

Features:

  • Multiple difficulty levels (Easy, Medium, Hard, Expert)
  • Smart hint system (direction, temperature, distance)
  • Real-time performance tracking
  • Game statistics and scoring
  • Colorful feedback and emojis
  • Time tracking and performance rating

Difficulty Levels:

  • Easy: 1-50, 10 attempts
  • Medium: 1-100, 7 attempts
  • Hard: 1-200, 5 attempts
  • Expert: 1-500, 8 attempts

Run the projects:

# CLI Number Guessing Gamecd number-guessing-game/clipython number_game.py# GUI Number Guessing Gamecd number-guessing-game/guipython number_game_gui.py

📝 TODO App with SQLite

A task management application demonstrating SQLite database operations:

  • CLI - Command line interface with comprehensive menu system
  • GUI - Modern Tkinter interface with all CRUD operations

Features:

  • SQLite Database Integration - Learn SQL operations hands-on
  • CRUD Operations - Create, Read, Update, Delete tasks
  • Advanced Filtering - View by status, search functionality
  • Priority System - High, Medium, Low priority levels
  • Statistics Dashboard - Task completion analytics
  • Database Management - View database info and structure

SQL Concepts Demonstrated:

  • CREATE TABLE - Database schema design
  • INSERT - Adding new records
  • SELECT - Querying data with WHERE, ORDER BY
  • UPDATE - Modifying existing records
  • DELETE - Removing records
  • AGGREGATION - COUNT, GROUP BY for statistics
  • SEARCH - LIKE operator for text search

Run the projects:

# CLI TODO Appcd todo-app/clipython todo_cli.py# GUI TODO Appcd todo-app/guipython todo_gui.py# Database demo (standalone)cd todo-apppython database.py

🌐 Internet Speed Test

A network performance testing application using Speedtest.net:

  • CLI - Command line interface with detailed progress and history
  • GUI - Modern Tkinter interface with real-time updates

Features:

  • Download/Upload Speed Testing - Accurate bandwidth measurement
  • Ping/Latency Testing - Network responsiveness measurement
  • Real-time Progress - Live updates during testing
  • Test History - Save and view previous test results
  • Server Selection - Choose specific test servers
  • Performance Analysis - Detailed speed ratings and recommendations
  • Statistics Dashboard - Historical data analysis

Network Concepts Demonstrated:

  • HTTP Requests - Network communication protocols
  • Threading - Background operations without blocking UI
  • Progress Callbacks - Real-time status updates
  • JSON Storage - Data persistence for test history
  • API Integration - Using external services (Speedtest.net)

Run the projects:

# Install dependencies firstcd speedtest-apppip install -r requirements.txt# CLI Speed Testcd clipython speedtest_cli.py# GUI Speed Testcd ../guipython speedtest_gui.py# Core module democd ..python speedtest_core.py

🎨 ASCII Art Generator

A creative CLI tool for converting text and images to ASCII art:

  • Text to ASCII - Transform text using various artistic fonts
  • Image to ASCII - Convert images to character-based art

Features:

  • Multiple Font Styles - 25+ figlet fonts (slant, big, block, bubble, etc.)
  • Character Set Options - Detailed, simple, classic, minimal character sets
  • Image Processing - Convert JPG, PNG, and other formats to ASCII
  • Customizable Output - Adjustable width, border options
  • File Export - Save ASCII art to text files
  • Preview Functions - Preview fonts and character sets before converting

Text Conversion Examples:

  • Basic: Simple text to ASCII art
  • Styled: Custom fonts and decorative borders
  • Sized: Adjustable width for different displays

Image Conversion Examples:

  • Photos: Convert portraits and landscapes
  • Logos: Transform brand graphics to text art
  • Icons: Create ASCII versions of symbols

Run the project:

# Install dependenciescd ascii-art-generatorpip install -r requirements.txt# Convert text to ASCII artpython ascii_generator.py text"Hello World"python ascii_generator.py text"Python" --font big --width 120# Convert image to ASCII artpython ascii_generator.py image photo.jpg --width 100python ascii_generator.py image logo.png --chars simple --banner# Preview available optionspython ascii_generator.py --list-fontspython ascii_generator.py --list-charspython ascii_generator.py --preview-fonts"ABC"# Save to filepython ascii_generator.py text"Save Me" --output my_art.txt# Get detailed helppython ascii_generator.py --help-detailed

👤 User Management API

A complete full-stack web application demonstrating modern API development:

  • Backend - Flask API with JWT authentication and SQLite database
  • Frontend - Modern vanilla JavaScript with responsive design

Features:

  • JWT Authentication - Secure token-based login system
  • User Registration - Account creation with validation
  • Profile Management - Edit username, email, and avatar
  • Avatar Upload - Image processing and storage
  • Admin Dashboard - User statistics and activity logs
  • Server Logging - Comprehensive activity tracking
  • Real-time Updates - Live dashboard data

API Endpoints:

  • POST /api/register - User registration
  • POST /api/login - User authentication
  • GET /api/profile - Get user profile
  • PUT /api/profile - Update profile information
  • POST /api/upload-avatar - Profile picture upload
  • GET /api/logs - Server activity logs
  • GET /api/stats - User statistics

Frontend Features:

  • Single Page Application - No page reloads
  • Responsive Design - Works on all devices
  • Modern UI/UX - Clean, professional interface
  • Form Validation - Client and server-side validation
  • File Upload - Drag & drop avatar upload
  • Real-time Alerts - User feedback system

Security Features:

  • Password Hashing - bcrypt encryption
  • JWT Tokens - Secure authentication
  • Input Validation - SQL injection prevention
  • File Validation - Safe image uploads
  • CORS Configuration - Cross-origin protection

Run the project:

# Install dependenciescd user-management-apipip install -r requirements.txt# Start backend servercd backendpython app.py# Backend: http://localhost:5000# Start frontend (new terminal)cd ../frontendpython -m http.server 3000# Frontend: http://localhost:3000# Test API with cURLcurl -X POST http://localhost:5000/api/register \  -H"Content-Type: application/json" \  -d'{"username":"test","email":"test@example.com","password":"password123"}'

🛠️ Global Requirements

  • Python 3.7+ (Required for all projects)
  • Flask - Web calculator, User management API
  • pyperclip - GUI password generator clipboard features
  • speedtest-cli - Internet speed test functionality
  • Pillow - ASCII art generator image processing, User API avatar processing
  • pyfiglet - ASCII art generator text styling
  • bcrypt - User management API password hashing
  • PyJWT - User management API authentication
  • Flask-CORS - User management API cross-origin requests

📦 Quick Install All Dependencies

# Install all project dependencies at oncepip install flask pyperclip speedtest-cli Pillow pyfiglet bcrypt PyJWT Flask-CORS

🎯 Learning Goals

This repository demonstrates progressive Python concepts:

Skill LevelTechnologies CoveredProjects
🟢 BeginnerBasic Python, Input/Output, ConditionalsCalculator, Password Gen, Guessing Game, ASCII Art
🟡 IntermediateGUI Programming, Database, File I/OTODO App, Advanced GUIs
🟠 AdvancedThreading, API Integration, Network ProgrammingSpeed Test, Web Calculator
🔴 ExpertFull-Stack Development, Authentication, SecurityUser Management API

📚 Technical Concepts

  • Multiple Implementation Approaches - Same functionality, different technologies
  • GUI Development - Desktop applications with Tkinter
  • Web Development - Full-stack applications with Flask
  • CLI Applications - Command-line interfaces and argument parsing
  • Database Programming - SQLite integration and SQL operations
  • Network Programming - HTTP requests and API integration
  • Threading - Background operations and real-time updates
  • CRUD Operations - Create, Read, Update, Delete data patterns
  • API Development - RESTful API design and implementation
  • Authentication & Security - JWT tokens, password hashing, CORS
  • Frontend-Backend Integration - Full-stack communication patterns
  • Code Organization - Clean project structure and best practices
  • Security Practices - Safe input handling and validation

🚀 Quick Start Guide

  1. Clone the repository

    git clone https://github.com/Efeckc17/simple-example-projects-in-Python.gitcd simple-example-projects-in-Python
  2. Install dependencies

    pip install flask pyperclip speedtest-cli Pillow pyfiglet bcrypt PyJWT Flask-CORS
  3. Pick a project from the table above and follow the specific instructions!

📄 License

MIT License


🌟 Support This Project

If you find this repository helpful for learning Python, please:

Star the repository - Show your support!
🍴Fork it - Create your own version
🐛Report issues - Help us improve
💡Suggest features - Share your ideas

📞 Connect

⭐ Star this repo if you find it useful for learning Python!


[8]ページ先頭

©2009-2025 Movatter.jp