Skip to main content

FRTG - Flask/React Twitter Grid

Overview

This is a basic project for serving a npm-managed React app with Flask. It renders twitter query results in a grid in a way convenient for diplaying on a kiosk or large screen.

Package-based installation

Create a (python 3) virtualenv and install using one of the following methods:

From PyPi

$ pip install frtg

From Source

$ python setup.py sdist
$ pip install dist/frtg-x.y.z.tar.gz

Running

Configuration

Use config-example.json as a template to create a configuration file. When running the server an environment variable called CONFIG_FILENAME and containing the path to this configuration file must be present.

Starting the Server

CONFIG_FILENAME=config.json FLASK_APP=frtg flask run

Note: if you are running from a source distribution and didn't install it in your virtualenv, you should execute the above from the top-level folder.

Alternatively, using the provided app.py might sometimes be convenient when developing:

CONFIG_FILENAME=config.json python frtg/app.py

or:

CONFIG_FILENAME=config.json python -m frtg.app

Development Environment

These notes are for setting up a development environment.

Setup

Create a (python 3) virtualenv and install the requirements:

$ pip install -e .

... and, to install additional libraries used by the test scripts:

$ pip install -r requirements.txt

Set up the node environment:

npm install

Generate Javascript Bundle

In a fresh environment, or whenever the ui sources are changed:

npm run build

Metadata

Release files for frtg 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frtg 0.5.2
File Size Uploaded
frtg-0.5.2.tar.gz 188.5 kB Details

Release files / frtg-0.5.2.tar.gz

Download URL frtg-0.5.2.tar.gz
Size 188.5 kB
Tags Source
SHA-256 checksum
How to use checksums
62d07a9d442028fc0037620cda6480656da1fce1ada8160de484d1bbd50c85e8
BLAKE2b-256 checksum
How to use checksums
b6b518e824eed0a273bdd5ba7ea39ccf4d4b20b848e56cd9dcaa4cb8408fa9b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.5.2 This release

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page