<commit_before># Flask-Large-Application-Example

PyPI Portal is a small demo app used as an example of a potentially large Flask application with several views and Celery tasks. This is how I structure my large Flask applications. In this README I'll explain my design choices with several aspects of the project.

For information on how to deploy this application to different production environments, visit [the project's wiki](https://github.com/Robpol86/Flask-Large-Application-Example/wiki).

For a demo of this application running in the cloud, visit http://ec2-54-213-40-230.us-west-2.compute.amazonaws.com/.

[![Build Status](https://travis-ci.org/Robpol86/Flask-Large-Application-Example.svg?branch=master)]
(https://travis-ci.org/Robpol86/Flask-Large-Application-Example)
[![Coverage Status](https://img.shields.io/coveralls/Robpol86/Flask-Large-Application-Example.svg)]
(https://coveralls.io/r/Robpol86/Flask-Large-Application-Example)

## Directory Structure

```GAP
├─ pypi_portal        # All application code in this directory.
│  ├─ core
│  ├─ models
│  ├─ static
│  ├─ tasks
│  ├─ templates       # Base templates used/included throughout the app.
│  │  ├─ 404.html
│  │  └─ base.html
│  │
│  ├─ views
│  │  ├─ view1
│  │  │  ├─ templates               # Templates only used by view1.
│  │  │  │  └─ view1_section1.html
│  │  │  │
│  │  │  ├─ section1.py             # Each view module has its own blueprint.
│  │  │  └─ section2.py
│  │  │
│  │  ├─ view2
│  │  └─ view3
│  │<commit_msg>More directory structure pieces.<commit_after># Flask-Large-Application-Example

PyPI Portal is a small demo app used as an example of a potentially large Flask application with several views and
Celery tasks. This is how I structure my large Flask applications. In this README I'll explain my design choices with
several aspects of the project.

For information on how to deploy this application to different production environments, visit
[the project's wiki](https://github.com/Robpol86/Flask-Large-Application-Example/wiki).

For a demo of this application running in the cloud, visit http://ec2-54-213-40-230.us-west-2.compute.amazonaws.com/.

[![Build Status](https://travis-ci.org/Robpol86/Flask-Large-Application-Example.svg?branch=master)]
(https://travis-ci.org/Robpol86/Flask-Large-Application-Example)
[![Coverage Status](https://img.shields.io/coveralls/Robpol86/Flask-Large-Application-Example.svg)]
(https://coveralls.io/r/Robpol86/Flask-Large-Application-Example)

## Directory Structure

```GAP
├─ pypi_portal        # All application code in this directory.
│  ├─ core
│  ├─ models
│  │  ├─ fruit.py
│  │  └─ vegetable.py
│  │
│  ├─ static
│  │  ├─ favicon.ico
│  │  └─ some_lib
│  │     ├─ css
│  │     │  └─ some_lib.css
│  │     └─ js
│  │        └─ some_lib.js
│  │
│  ├─ tasks
│  ├─ templates       # Base templates used/included throughout the app.
│  │  ├─ 404.html
│  │  └─ base.html
│  │
│  ├─ views
│  │  ├─ view1
│  │  │  ├─ templates               # Templates only used by view1.
│  │  │  │  └─ view1_section1.html  # Naming convention: package_module.html
│  │  │  │
│  │  │  ├─ section1.py             # Each view module has its own blueprint.
│  │  │  └─ section2.py
│  │  │
│  │  ├─ view2
│  │  └─ view3
│  │
{'fraction_non_alphanumeric': 0.13608374384236452, 'fraction_numerical': 0.020320197044334975, 'mean_word_length': 3.1814671814671813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3120191', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1238, 'n_words': 404}