Skip to content

beingsaumyadeep/py-commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Application

This is a Python-based e-commerce application built with FastAPI, SQLAlchemy, and Redis for session management. This README provides instructions on how to set up, install, and run the application.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3.8 or higher
  • PostgreSQL for the database
  • Redis for session management
  • pip for package management

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ecommerce.git
    cd ecommerce```
    
  2. Set up a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

  • On macOS/Linux:

    source venv/bin/activate
  • On Windows:

    venv\Scripts\activate
  1. Install the required packages:

    pip install -r requirements.txt
  2. Configuration:

    Create a .env file in the root of your project and add the following environment variables:

    DATABASE_URL="postgresql://username:password@host:port/database"
    ANTROPIC_API="your_antropic_api_key"
    REDIS_DB="rediss://username:password@host:port"
    REDIS_HOST="your_redis_host"
    REDIS_PORT=your_redis_port
    REDIS_USER="your_redis_username"
    REDIS_PASS="your_redis_password"
    

    Modify the database URL with your PostgreSQL credentials.

  3. Running the Application:

    Start the application:

    uvicorn main:app --reload

    The application will be available at http://127.0.0.1:8000.

    Access the API documentation: Open your browser and go to http://127.0.0.1:8000/docs to view the interactive API documentation provided by FastAPI.

API Endpoints

  • User Registration: POST /users/
  • User Login: POST /login
  • Get Current User: GET /users/me

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages