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 the 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, base_url='https://example.com')

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.dev2.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file elsa-0.1.dev2.tar.gz.

File metadata

  • Download URL: elsa-0.1.dev2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for elsa-0.1.dev2.tar.gz
Algorithm Hash digest
SHA256 1149c7d05a908d9f49258ed01b2bf7092984d0ba509d09866999691aa6d862f4
MD5 fc1fb42d9669b9cb1c4c327664a2dc71
BLAKE2b-256 b39d1d33badf009657e8d39ef20c4a2388146f9616abdfb16bae499a3120fd3d

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