Skip to main content

Database driven web application framework in Flask

Project description

Cascading, Highly Irrelevant, Lost Llamas

Or, just chill. This is a database driven web application framework in Flask and it can be used to create static or dynamic web sites.

This involves creating custom SQL queries to pull data from a database and uses Jinja2 HTML templates to populate pages for a website. Chill can create static files for the website or can run as a Flask app and build pages on request.

Chill is database driven when it comes to handling http requests. Each http request uses data from the database when determining what content to show on the page as well as what HTML templates to use. Content for a page can come from other database queries and can recursively call other queries when populating the page.

Installing

Chill can be installed via pip.

python3 -m pip install chill[cli]

Or from within this cloned project; install with pip in editable mode. It is recommended to setup a virtual environment first.

# Create a python virtual environment in the project directory and activate it.
python3 -m venv .
source ./bin/activate

# Install chill in editable mode
python -m pip install -e .[cli,test]

This will create a script called chill. Type chill --help for help on using it. It will need a config file and such. I recommend creating an empty directory and running chill init within it. That will create a site.cfg config file and the bare minimum to show a homepage. Run the chill run --config site.cfg and visit http://localhost:5000/ with your browser.

Quick start

Run the chill init script in an empty directory and it will create a minimal starting point for using Chill. The site.cfg created will have comments on each configuration value. The chill run --config site.cfg will run the app in the foreground at the http://localhost:5000/ URL. Notice that the script also creates a sqlite database file (default file name is 'db') in that directory. This database file is what chill uses to display the pages in a site.

Review the docs for more. Some helpful guides and such are in the docs/ folder. The tests.py file within the chill package is also a good resource.

Static site generator

The command chill freeze --config site.cfg will go through all the URLs and create a static version of each page. It places all the necessary files in a folder which can then be uploaded to a static web server. This is a wrapper around the Frozen-Flask python package. Which is partly the inspiration behind the name 'chill'. Also, llamas are cool and have two 'l's like chill.

Docker

A Dockerfile has been included which can be used when creating a container for chill. See the guide on using chill with docker.

Contributing

Please contact Jake Hickenlooper or create an issue.

Any submitted changes to this project require the commits to be signed off with the git command option '--signoff'. This ensures that the committer has the rights to submit the changes under the project's license and agrees to the Developer Certificate of Origin.

License

GNU Lesser General Public License v3.0

Maintenance

Where possible, an upkeep comment has been added to various parts of the source code. These are known areas that will require updates over time to reduce software rot. The upkeep comment follows this pattern to make it easier for commands like grep to find these comments.

Example UPKEEP comment has at least a 'due:' or 'label:' or 'interval:' value surrounded by double quotes (").

Example-> # UPKEEP due: "2022-12-14" label: "Llama Pie" interval: "+4 months"

Show only past due UPKEEP comments.

make upkeep

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

chill-0.11.0.tar.gz (52.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chill-0.11.0-py3-none-any.whl (68.5 kB view details)

Uploaded Python 3

File details

Details for the file chill-0.11.0.tar.gz.

File metadata

  • Download URL: chill-0.11.0.tar.gz
  • Upload date:
  • Size: 52.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for chill-0.11.0.tar.gz
Algorithm Hash digest
SHA256 af18c2333568590b21265feb8cc9a082289369ad3a2ee1c05b6511939c0e06f2
MD5 9902f59a468691e3bf0a69315694f466
BLAKE2b-256 758307b6e7d7d89bf84e17ffbc4c68e69a99583bbb98e7bf9ff39b35644bca61

See more details on using hashes here.

File details

Details for the file chill-0.11.0-py3-none-any.whl.

File metadata

  • Download URL: chill-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 68.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for chill-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c572c2a2bcb2d7ca78e8fef4248e2cb54763d5e3d547745d477d55012f0eaf
MD5 fb1ca39b4d8af46ecd566d365442430d
BLAKE2b-256 fee18b4a2b7a482e50df0ae034cf112c945a41900b5a1057c0deac93e7c1e452

See more details on using hashes here.

Supported by

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