Skip to content

damhuman/dummyCSVGenerator

Repository files navigation

Dummy CSV Generator

Dummy CSV Generator is a service for generating CSV files with fake(dummy) data. The project demo is deployed on Heroku.

Getting started

  1. Clone the project, create a virtual environment, and activate it.
git clone [email protected]:damhuman/dummyCSVGenerator.git
cd dummyCSVGenerator

python3 -m venv env
source env/bin/activate
  1. Install dependencies from the requirements file
pip install -r requirements.txt
  1. Set environmental variables in the virtualenv. You may use Heroku to set up Redis and Postgres, but you can run them locally instead.
export DATABASE_URL="postgres://..."
export REDIS_URL="redis://..."
export SECRET_KEY="SECRET KEY HERE"

Also, you can change DATABASES parameter in the settings.py file in case if you want to configure the database connection directly.

DATABASES = {
'default':{
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'django_db',
    'USER' : 'user_name',
    'PASSWORD' : 'password',
    'HOST' : '127.0.0.1',
    'PORT' : '5432',
}
  1. You can use Amazon S3 bucket to store all generated CSV files. To do this create an S3 bucket and add needed parameters to the virtualenv. Set USE_S3="FALSE" if you want to store files locally in media directory
export USE_S3="TRUE"
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_STORAGE_BUCKET_NAME="..."

or

export USE_S3="FALSE"

Running the project

python3 manage.py runserver
celery -A generator worker -l info

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published