Skip to content

payallenka/facultyUpload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CASE 2: Faculty Upload

One of many case of the VendOPrint project

Setting up a virtual environment

  1. Install virtualenv
pip install virtualenv
  1. Create and move into the project directory
mkdir projectA
cd projectA
  1. Activate the virtual environment (for linux)
source env/bin/activate
  1. Verify whether the virtual environment is created successfully
pip list

This will list all the dependencies of the virtual environment

Congratulations you have isolated application dependencies from the system dependencies!

Creating a requirements file

pip freeze > requirements.txt

This will list all the dependencies of the application, which can be used to replicate across different systems

Creating an environment file to store secrets or configuration information

  1. Install python-dotenv to interact with environment variables.
pip install python-dotenv
  1. create an .env file to store secrets or configuration information
touch .env
  1. Open the environment file(linux)
nano .env
  1. open the environment file and past the following lines
AWS_ACCESS_KEY_ID = 'your_aws_access_key'
AWS_SECRET_ACCESS_KEY = 'your_secret_access keys'
AWS_S3_BUCKET_NAME = 'your_bucket_name'

DB_HOST = 'your_db_host'
DB_USERNAME = 'your_db_username'
DB_PASSWORD = 'your_db_password'
DB_NAME = 'you_db_name'
  1. Exit the nano editor
ctrl + s and ctrl + x
  1. Add a .gitignore file
touch .gitignore
  1. Add .env to .gitignore file to prevent it from being committed to codebase

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published