semvec/pypi-packages huggingface dataset:
flask-webpack-loader 0.0.4
Transparently use webpack with flask
Keywords: flask,webpack,assets

# flask-webpack-loader


flask version [django-webpack-loader](https://github.com/owais/django-webpack-loader)


## Install

```bash
npm install --save-dev webpack-bundle-tracker

pip install flask-webpack-loader
```

## Usage
app.py
```python
from flask_webpack_loader import WebpackLoader

webpack_loader = WebpackLoader(app)
```

template.html
```html
    {{ render_bundle('main') | safe }}
    
    # webpack 4+
    {{ render_bundle('runtime~main') | safe }}
    {{ render_bundle('undefined') | safe }}
```

## Configuration

```python
WEBPACK_LOADER = {
    'BUNDLE_DIR_NAME': os.path.join('static', 'bundles'),
    'STATIC_URL': 'static',
    'STATS_FILE': 'webpack-stats.prod.json',
    'POLL_INTERVAL': 0.1,
    'TIMEOUT': None,
    'IGNORES': [re.compile(r'.+\.hot-update.js'), re.compile(r'.+\.map')]
}
```
cumtime 0.3.0
Cumulative measurement of execution time
Requires Python: >=3.6
Keywords: cumtime

# Cumtime

```
import cumtime
cumtime.register('cum')

with c('t1'):
    time.sleep(0.01)

cum.begin('t1')
time.sleep(0.01)
cum.end()

print(cum)
# t1: sum:0.02 n:2 ave:0.01'
```
flask-core 2.9.0
A modular Flask core for CTF war-games, originally created for CS6443

# Flask Core

This is a reusable core used to back COMP6443 applications.

## Overview

Flask Core is intended to be an installable Pip package to which Flask blueprints can be attached to.

## Configuration Variables

TBA

## Config Environment Variables

Flask Core accepts some configuration through environment variables.

#### FLAG_IDS

**Required**

Comma seperated list of a id for every flag on this site, these ids can then be used with `current_app.gen_flag(zid,flag_id)` to generate a actual flag. The id is just used so you can generate the same flag in multiple places and also so the `/core/checker` site works. 

#### FLAG_WRAP

**Required**

This is what generated flags are wrapped in, i.e if you set `FLAG_WRAP` to `BREAK1` then all flags will be in the format `BREAK1{abc...}`

#### FLAG_SECRET

**Required**

This is the secret key which flask will use to generate flags via the `current_app.gen_flag(zid,flag_id)`

#### DB_CONNECTION_STRING

**Required**

URI used to connect to a database.

Example:

```
postgres://root:root@localhost/test
``` 

#### FLASK_CORE_CONFIG

*Default: None*

When pointed to a valid pyconf file, this sets the contained options within Flask and Flask Core.

Example pyconf:

```python
THEME = "flatly"
TITLE = "A Title"
```

#### FLASK_CORE_ENABLE_AUTH

*Default: True*

Enforces user authentication.

#### FLASK_CORE_ENABLE_ISOLATION

*Default: True*

Isolates each user's database connection. Depends on user's authentication to function.

#### FLASK_CORE_AUTO_GENERATED_FLAGS

*Default: True*

Greps for flags in responses and replaces them with a user specific auto generated flag. Relies on auth. 

## Flag Generation

If you have auto flag generation turned on just stats all the flag_ids in the enviornment variable then you can either do 

```
current_app.gen_flag(zid,flag_id)
```

to generate a flag or actually just put the string

```
FLAG{_flagid}
```

in any response and it'll get auto grepped out and replaced with a actual flag. 

i.e 

```
FLAG_IDS=xss,csrf
```

chuck in the response 

```
FLAG{_xss}
```

and it'll get replaced :)
webmontage 1.0.0
Web page montage generator

# webmontage
A tool for producing a montage depicting the development and design of a web page via its git commit history.

**requirements**
This library uses the `selenium` Python library to drive the headless Chrome browser to load the static web page. This requires that the proper ChromeDriver be downloaded and placed somewhere in the PATH. Download ChromeDriver for your installed version of Google Chrome here: https://sites.google.com/a/chromium.org/chromedriver/downloads

**usage:**
```
$ webmontage [-h] [-f FILE] [--browser-width BROWSER_WIDTH]
                  [--browser-height BROWSER_HEIGHT]
                  [--video-width VIDEO_WIDTH] [--video-height VIDEO_HEIGHT]
                  repository index_page

WebMontage - Static site montage generator using git history

positional arguments:
  repository            The absolute path to the root of the git repository
                        for the web page
  index_page             The index file relative to the root of the repo, i.e.
                        'index.html'

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  If given, only commits that affect this file will be
                        considered, i.e. 'main.css'
  --browser-width BROWSER_WIDTH
                        Width of the browser window to load the web page in
  --browser-height BROWSER_HEIGHT
                        Height of the browser window to load the web page in
  --video-width VIDEO_WIDTH
                        Width of the slideshow window to display the montage
                        in
  --video-height VIDEO_HEIGHT
                        Height of the slideshow window to display the montage
                        in```