Skip to main content

A collection of utility functions for AWS services

Project description

============================================== x24142816 Remote worktime tracker Guide

This document provides an overview of the dependencies, setup, and deployment steps. And thiw project interacts with AWS services such as S3, DynamoDB, SQS, SNS, and CloudWatch.


1. Required Dependencies

Ensure you have Python 3.6+ installed.

To install the required dependencies, run:

pip install -r requirements.txt

List of dependencies:

boto3==1.37.8
botocore==1.37.8
Django==4.2.19
setuptools==59.6.0
gunicorn==23.0.0
Pillow==11.1.0

(Note: The requirements.txt file is located in the project's root directory.)


2. utils > library 

utils - AWS Utilities Library.

utils is a Python library that provides various utility functions to interact with AWS services such as S3, DynamoDB, SQS, and CloudWatch.

Features

  • CloudWatch: Create log groups and streams, and write logs to CloudWatch.
  • DynamoDB: Save and update user data and worktime in DynamoDB.
  • S3: Manage files in S3 storage.
  • SQS: Send and receive messages from SQS.
  • SNS: Send notifications using SNS.

Installation

You can install this library using pip:

pip install utils

3. Application Setup & Execution

Clone the Repository

git clone https://github.com/Jiyoung0716/Final_CPP_Project.git
cd Final_CPP_Project

For macOS/Linux:

python -m venv env
source env/bin/activate

For Windows:

python -m venv env
env\Scripts\activate

Install Dependencies

pip install -r requirements.txt

env file** (store sensitive credentials):

AWS_REGION=us-east-1
S3_BUCKET_NAME=x24142816-s3bucket
DYNAMODB_TABLE_USERS=Users
DYNAMODB_TABLE_WORKTIME=Worktime
DYNAMODB_TABLE_PROJECTS=Projects
SNS_TOPIC_ARN=arn:aws:sns:us-east-1:278101256714:x24142816-notification
SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/278101256714/x24142816_JiyoungKim_Queues

Run the Application

python manage.py runserver 8080
python3 manage.py runserver 8080

4. Deployment Steps (Elastic Beanstalk)

Initialize Elastic Beanstalk

eb init -p python-3.9 Remoteworktimetracker

Create an Environment

No need since the environment already exists (my-env)

Deploy the Application

eb deploy

Check Logs

eb logs

Open Application

eb open

5. Configuration Files

** django.config (Elastic Beanstalk Configuration)**

Located in `.ebextensions/`, this file contains environment settings for Django.

option_settings:
    aws:elasticbeanstalk:container:python:
        WSGIPath: tracker.wsgi:application

** python-publish.yml (GitActions)**

This GitHub Actions workflow automates the CI/CD process 
for publishing a Python package to PyPI.
(content: pylint-static analysis, library)

** Procile (Role to run Django with Gunicorn)**

web: gunicorn --bind 0.0.0.0:8080 tracker.wsgi:application

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

library_utils-0.1.7.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

library_utils-0.1.7-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file library_utils-0.1.7.tar.gz.

File metadata

  • Download URL: library_utils-0.1.7.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for library_utils-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e0a4d9be83e6fa4abc522d4e6fed43e631d66d97c691219d146e923f2b6ff020
MD5 690c55f481350ae673ae3bf9e5555859
BLAKE2b-256 b4095e799047d33f8f22406711f064274fa2ad9c21627daa137c0f008a5dae07

See more details on using hashes here.

File details

Details for the file library_utils-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: library_utils-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for library_utils-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 1997fc95ebd1882f97c02a7834e5510fe8bb684d572e2639e870189f8dfc3255
MD5 3ef4c9dce508a2ce89ce3397d9d7e6c8
BLAKE2b-256 8e47361c09ed32e6e40c4524dd8b84b4ceaf4ec1598c1bc6a521832f58935d9e

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