Skip to main content

The basic blog app built in the Flask tutorial.

Project description

The basic blog app built in the Flask tutorial.

Install

Be sure to use the same version of the code as the version of the docs you’re reading. You probably want the latest tagged version, but the default Git version is the master branch.

# clone the repository
$ git clone https://github.com/pallets/flask
$ cd flask
# checkout the correct version
$ git tag  # shows the tagged versions
$ git checkout latest-tag-found-above
$ cd examples/tutorial

Create a virtualenv and activate it:

$ python3 -m venv venv
$ . venv/bin/activate

Or on Windows cmd:

$ py -3 -m venv venv
$ venv\Scripts\activate.bat

Install Flaskr:

$ pip install -e .

Or if you are using the master branch, install Flask from source before installing Flaskr:

$ pip install -e ../..
$ pip install -e .

Run

$ export FLASK_APP=flaskr
$ export FLASK_ENV=development
$ flask init-db
$ flask run

Or on Windows cmd:

> set FLASK_APP=flaskr
> set FLASK_ENV=development
> flask init-db
> flask run

Open http://127.0.0.1:5000 in a browser.

Test

$ pip install '.[test]'
$ pytest

Run with coverage report:

$ coverage run -m pytest
$ coverage report
$ coverage html  # open htmlcov/index.html in a browser

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flaskrrr-1.0.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

flaskrrr-1.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file flaskrrr-1.0.0.tar.gz.

File metadata

  • Download URL: flaskrrr-1.0.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flaskrrr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7151cc12ddc67d7ff3c00591b325b70e5e74637ce3cecf77cc085a04f4e163db
MD5 5bf1daa33a3057fc8a59034c7f7b86b5
BLAKE2b-256 a235b9e52e26fc5a9f6d2c3dd8ea55d3375628ad9abc6c74702cdc4e80f2231c

See more details on using hashes here.

File details

Details for the file flaskrrr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: flaskrrr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for flaskrrr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd3011a562da031cdec02e84bb06849dbcc355e8cbf4957cb9c56e8c147a04e4
MD5 774e6b40e0d679c457f2c43f6eaeec60
BLAKE2b-256 c4a826f2abdfd147863ef3f3eb662248ea0dd0f8086145db7b9eb9329270e228

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page