{"id":18676684,"url":"https://github.com/mikeghen/blockflix","last_synced_at":"2025-04-12T02:14:01.542Z","repository":{"id":81764316,"uuid":"143650202","full_name":"mikeghen/blockflix","owner":"mikeghen","description":"Python Flask Application For A Mock DVD Rental Company","archived":false,"fork":false,"pushed_at":"2018-09-29T17:46:25.000Z","size":1370,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T02:13:56.782Z","etag":null,"topics":["elasticbeanstalk","flask","mysql","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeghen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-05T21:50:51.000Z","updated_at":"2018-12-11T08:42:37.000Z","dependencies_parsed_at":"2023-03-12T14:00:00.864Z","dependency_job_id":null,"html_url":"https://github.com/mikeghen/blockflix","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeghen%2Fblockflix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeghen%2Fblockflix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeghen%2Fblockflix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeghen%2Fblockflix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeghen","download_url":"https://codeload.github.com/mikeghen/blockflix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505925,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticbeanstalk","flask","mysql","python"],"created_at":"2024-11-07T09:30:32.408Z","updated_at":"2025-04-12T02:14:01.525Z","avatar_url":"https://github.com/mikeghen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BlockFlix\nThis is a Flask application that implements an DVD Rental company's online transaction processing (OLTP) application. This application implements a database schema similar to loosely modeled after MySQL's Sakila sample database.\n\nThis project is designed to be used in a [Full Stack Data Engineering](http://google.com) course. There is no real front end functionality beyond a few data tables. Use this application for practicing seeding data, deploying applications, and performing ETL operations.\n\n\n## Running with Docker\nBuild the Docker image for Blockflix:\n```\ndocker build -t blockflix .\n```\nRun the application and database with Docker Compose:\n```\ndocker-compose up\n```\nAccess the applicaiton on port 5000:\n```\nhttp://localhost:5000\n```\n\n## Development Setup\nFollow these instructions to install the application on your computer.\n\n### Install OS Dependencies\nInstall these OS dependencies:\n* MySQL\n* Python 3\n* Nodejs\n\n### Application Installation\nDownload the application codebase, install the Python packages and Node.js packages:\n```\ngit clone https://github.com/mikeghen/blockflix\ncd blockflix\npip install -r requirements/dev.txt\nnpm install\n```\nSet the following Flask environment variables before running the application:\n```\nexport FLASK_APP=autoapp.py\nexport FLASK_DEBUG=1\n```\n### Database Setup\nStart by creating the application's database on your MySQL database server and database user:\n```\nCREATE DATABASE blockflix_development;\nCREATE USER 'blockflix'@'127.0.0.1' IDENTIFIED BY 'blockflix';\nGRANT ALL PRIVILEGES ON blockflix_development.* TO 'blockflix'@'localhost';\n```\nRun the following to create database tables for the application:\n```\nflask db upgrade\n```\n\n### Start the Application\nFinally, run the development server with:\n```\nnpm start\n```\n\n## Deployment\nTo deploy:\n```\nexport FLASK_DEBUG=0\nnpm run build   # build assets with webpack\nflask run       # start the flask server\n```\nIn your production environment, make sure the ``FLASK_DEBUG`` environment\nvariable is unset or is set to ``0``, so that ``ProdConfig`` is used.\n\n:information_source: We will use Elastic Beanstalk to deploy the application.\n\n## Shell\n\nTo open the interactive shell, run ::\n```\nflask shell\n```\nBy default, you will have access to the flask ``app``.\n\n\n## Running Tests\n\nTo run all tests, run:\n```\nflask test\n```\n\n## Migrations\n\nWhenever a database migration needs to be made. Run the following commands ::\n```\nflask db migrate\n```\nThis will generate a new migration script. Then run ::\n```\nflask db upgrade\n```\nTo apply the migration.\n\nFor a full migration command reference, run ``flask db --help``.\n\n\n## Asset Management\nFiles placed inside the ``assets`` directory and its subdirectories\n(excluding ``js`` and ``css``) will be copied by webpack's\n``file-loader`` into the ``static/build`` directory, with hashes of\ntheir contents appended to their names.  For instance, if you have the\nfile ``assets/img/favicon.ico``, this will get copied into something\nlike\n``static/build/img/favicon.fec40b1d14528bf9179da3b6b78079ad.ico``.\nYou can then put this line into your header::\n```\n\u003clink rel=\"shortcut icon\" href=\"{{asset_url_for('img/favicon.ico') }}\"\u003e\n```\nto refer to it inside your HTML page.  If all of your static files are\nmanaged this way, then their filenames will change whenever their\ncontents do, and you can ask Flask to tell web browsers that they\nshould cache all your assets forever by including the following line\nin your ``settings.py``::\n```\nSEND_FILE_MAX_AGE_DEFAULT = 31556926  # one year\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeghen%2Fblockflix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeghen%2Fblockflix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeghen%2Fblockflix/lists"}