Skip to main content

Helper module for Frozen-Flask based websites

Project description

Elsa will help you build your Frozen-Flask based website and deploy it to GitHub pages. It’s based on scripts from PyLadies.cz repo and is distributed under the terms of MIT license, see LICENSE (does not apply for the image below). It requires Python 3.

elsa

Image linked from cartoonbros.com, not stored in the repo, so the repo remains free.

Basic usage

Create you Flask app and give it to elsa.cli():

from flask import Flask

app = Flask(...)

# do stuff with app

if __name__ == '__main__':
    from elsa import cli
    cli(app)

Then you can run your script like this:

python foo.py serve  # serves the site, no freezing
python foo.py freeze  # freeze the site, i.e. make a HTML snapshot
python foo.py deploy  # deploy the frozen site to GitHub pages

See more options with --help.

Travis CI based deployment

Here is an example .travis.yml file for automatic deployment. It assumes elsa and other requirements are in requirements.txt and that you are familiar with Travis CI (so it’s not very verbose):

language: python
python:
    - '3.5'
script:
    - "echo 'No linters, no tests...'"
env:
  global:
    - secure: "blahblah"  # gem install travis; travis encrypt GITHUB_TOKEN=xyz --add
deploy:
    provider: script
    script: 'python foo.py deploy'
    on:
        branch: master
        repo: only/yours

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

elsa-0.1.dev1.tar.gz (4.6 kB view hashes)

Uploaded Source

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