Skip to content

Ycandido0119/intermediate-python-projects

Repository files navigation

Python Projects Repository

A collection of Django web applications, data analysis projects, and AI-powered tools demonstrating various Python development skills.

📁 Projects Overview

1. Amazon Best Sellers Analysis

Location: amazon-best-sellers-analysis/

A data analysis project examining Amazon bestselling books from 2009-2019.

Features:

  • Analysis of 550+ bestselling books
  • Author frequency analysis
  • Genre-based rating comparisons
  • Price and review statistics

Files:

  • bestsellers.csv - Raw dataset with book information
  • main.py - Data analysis script using pandas
  • top_authors.csv - Top 10 most published authors
  • avg_rating_by_genre.csv - Average ratings by genre

Key Findings:

  • Fiction average rating: 4.65
  • Non-Fiction average rating: 4.60
  • Top authors include Jeff Kinney, Gary Chapman, and Rick Riordan

2. GraphQL Movie API

Location: graphql_movie_api/

A Django-based GraphQL API for managing movies, actors, and reviews.

Tech Stack:

  • Django 5.2.8
  • Graphene-Django (GraphQL integration)
  • SQLite database

Features:

  • Movies: CRUD operations with title, summary, duration, release date, and trailer URL
  • Actors: Manage actor profiles with biography and filmography
  • Movie Cast: Link actors to movies with character names
  • Reviews: 5-star rating system with recommendations

API Endpoints:

  • http://localhost:8000/graphql/ - GraphQL playground (GraphiQL interface)
  • http://localhost:8000/admin/ - Django admin panel

Usage:

cd graphql_movie_api
python manage.py runserver

Sample Queries:

# Get all movies
query {
  allMovies {
    id
    title
    duration
    releaseDate
  }
}

# Create a movie
mutation {
  createMovie(
    title: "Example Movie"
    summary: "A great story"
    duration: 120
    releaseDate: "2024-01-01"
    trailerUrl: "https://example.com/trailer"
  ) {
    movie {
      id
      title
    }
    success
    message
  }
}

Note: There's a typo in the Movie model - sunnary should be summary. This is mapped correctly in the GraphQL schema.


3. Login Authentication System

Location: login_authentication_system/

A complete Django user authentication system with registration and login functionality.

Features:

  • User registration with form validation
  • Secure login system
  • Password hashing
  • Bootstrap-styled templates
  • Flash messages for user feedback
  • GeeksforGeeks themed design

Pages:

  • /register/ - User registration
  • /login/ - User login
  • /home/ - Welcome page (login required)

Usage:

cd login_authentication_system/core
python manage.py runserver

Security Notes:

  • Uses Django's built-in password hashing
  • CSRF protection enabled
  • SECRET_KEY should be changed for production use

4. My Starter Blog

Location: my_starter_blog/

A full-featured Django blog application with post management and admin interface.

Features:

  • Blog post creation and management
  • Draft/Published status workflow
  • Slug-based URLs
  • Author attribution
  • Timestamp tracking (created/updated)
  • Responsive Bootstrap UI
  • Admin panel for content management

Pages:

  • / - Blog homepage with all published posts
  • /<slug>/ - Individual post detail page
  • /admin/ - Django admin panel

Usage:

cd my_starter_blog
python manage.py runserver

Admin Setup:

python manage.py createsuperuser

5. Voice Virtual Assistant (VVA)

Location: vva_app.py

An AI-powered voice assistant using ElevenLabs Conversational AI API.

Features:

  • Real-time voice conversation
  • Schedule management integration
  • Customizable agent prompts
  • Audio interface for natural interaction
  • Conversation callbacks for logging

Requirements:

  • ElevenLabs API key
  • Agent ID from ElevenLabs platform
  • .env file with credentials

Environment Variables:

AGENT_ID=your_agent_id_here
API_KEY=your_api_key_here

Usage:

python vva_app.py

Capabilities:

  • Voice-based interaction
  • Context-aware responses
  • Schedule tracking and reminders
  • Real-time transcription

🛠️ Setup Instructions

Prerequisites

  • Python 3.8+
  • pip (Python package manager)
  • Virtual environment (recommended)

General Installation

  1. Clone the repository:
git clone 
cd 
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies for specific projects:

For Django projects:

pip install django

For GraphQL Movie API:

cd graphql_movie_api
pip install django graphene-django

For Data Analysis:

cd amazon-best-sellers-analysis
pip install pandas

For Voice Assistant:

pip install elevenlabs python-dotenv
  1. Run migrations (Django projects):
python manage.py migrate
python manage.py createsuperuser  # Optional, for admin access
  1. Start the development server:
python manage.py runserver

📊 Data Analysis Insights

The Amazon Best Sellers analysis reveals:

  • Dataset Size: 550 unique books (after removing duplicates)
  • Time Period: 2009-2019
  • Top Authors: Jeff Kinney (12 books), Gary Chapman (11 books), Rick Riordan (11 books)
  • Genre Distribution: Relatively balanced between Fiction and Non-Fiction
  • Rating Trends: Fiction books slightly higher rated (4.65 vs 4.60)

🔒 Security Considerations

Important: This repository contains development settings. Before deploying to production:

  1. Change all SECRET_KEY values in settings.py files
  2. Set DEBUG = False in production
  3. Configure proper ALLOWED_HOSTS
  4. Use environment variables for sensitive data
  5. Never commit .env files (already in .gitignore)
  6. Use a production-grade database (PostgreSQL recommended)
  7. Enable HTTPS and secure cookies
  8. Review and update security middleware settings

📝 Known Issues

  1. GraphQL Movie API: The Movie model has a typo - sunnary instead of summary
  2. Login System: Missing password reset functionality
  3. Blog: No comment system implemented
  4. VVA App: Contains a typo - dynamice_variables should be dynamic_variables

🚀 Future Enhancements

  • Add REST API endpoints to complement GraphQL
  • Implement password reset functionality
  • Add comment system to blog
  • Include unit tests for all projects
  • Add Docker containerization
  • Implement CI/CD pipeline
  • Add API rate limiting
  • Enhance error handling and logging
  • Add user profile pages
  • Implement search functionality

📚 Technologies Used

  • Backend: Django, Python
  • APIs: GraphQL (Graphene), REST
  • Database: SQLite (development)
  • Data Analysis: Pandas
  • AI/ML: ElevenLabs Conversational AI
  • Frontend: Bootstrap, HTML/CSS
  • Authentication: Django Auth System

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors