============================================== 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
- write logs to CloudWatch for monitoring authentication attempts
- Track login failures and store security-related logs
DynamoDB
- Save user information (ID, email, phone_number, etc..)
- Store and retrieve worksession data, including timestamps and overtime
S3
- Upload user profile pictures and store them securely in an S3 bucket
SQS
- Send asynchronous messages to an SQS queue
SNS
- Send event-driven notifications to administrators
Installation
You can install this library using pip:
pip install library-utils
How to Use (Call Functions)
To use this library in Python, import the required module:
from time_tracker.utils.<module_name> import <function_name>
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
Metadata
Release files for library-utils 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| library_utils-0.1.9.tar.gz | 7.6 kB | Without provenance | Details for library_utils-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| library_utils-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for library_utils-0.1.9-py3-none-any.whl |
Total release size: 16.7 kB
Release files / library_utils-0.1.9.tar.gz
| Download URL | library_utils-0.1.9.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
67a1d4bffa0ef7ffe0a93dfd47bfc91f2a4cf4b0a60b3e91bda7069042c46205
|
|
BLAKE2b-256 checksum How to use checksums |
3d1c3995596ebf5559eb0872f33b1ca3459a1d4fac626d8a4b93be50a0e77b27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / library_utils-0.1.9-py3-none-any.whl
| Download URL | library_utils-0.1.9-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab977ce7b9079b445ba4f9446b5beefe47aea4330f593cff9b378e1a5a1f3ba5
|
|
BLAKE2b-256 checksum How to use checksums |
cf6fa40a775743f63fd2c982ffeb6f96c1cb6ab4fe9b18c607563f6692798a0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for library-utils 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.