Quick Start Guide The free Hello World demo download uses a minimal user interface to quickly demonstrate basic Snakeify input and output concepts. In addition, we've provided a Full Demo containing all of our Snakeify UI components to download and use for free! Hello World downloads Mac: hello_world.zip Linux: hello_world.zip Full Demo downloads Mac: full_demo.zip Linux: full_demo.zip NOTE: Be sure to have Python 3.x installed and in your PATH. There are no libraries to install. |
Directory Structure Within each unzipped demo file are two simple directory branches. The frontend contains the website's optimized pages plus a test server for running pages locally on your computer to evaluate. The backend contains matching Python file names of corresponding frontend HTML files. It also contains a compiled high-performance web server for actual cloud deployments. |
Python Callback Files Each Python callback() function's ui variable can directly access or modify frontend UI parameters. For the ui.text_input variable, [0] is the 1st instance of available text_input components within the page. The ["input"] parameter contains the textbox's typed user input.
Please see the API Reference for complete UI parameter definitions. |
Localhost Test Server The Snakeify test server is used for running locally on your PC when developing your own Python callback code. It is run from the frontend directory by calling the run_localhost.sh script within a Mac or Linux terminal window. The page can then be viewed by opening URL http://127.0.0.1:3000 from your local web browser.
The Python callback files within the backend "src" directory can be modified while the localhost test server is running to debug and see your changes in real time. |
Website Deployment (Backend) The backend files must be uploaded to a traditional Linux-based VPS or cloud host (with or without the "backend" subdirectory name). The Snakeify production server is run by calling run_server.sh from your host with startup bash scripts, cron jobs or systemctl services. |
Website Deployment (Frontend) If the frontend and backend files will be stored on different hosting platforms, the script set_backend_url.sh must be run before deployment. This script modifies the frontend code to use your new backend URL path for Python callback handling. If not needed, it will default to localhost URL http://127.0.0.1 (the port is always 8000).
The frontend files must be deployed without the "frontend" subdirectory, since all HTML files must reside within the host's top-level primary directory. These files can be uploaded to a VPS/cloud host (same host as backend files) or a separate Jamstack host platform.
NOTE: We highly recommended using a Jamstack-based hosting platform. It can serve frontend pages across geographic Content Delivery Networks (CDNs) for faster webpage loading times: Netlify, Vercel, Cloudflare Pages, AWS S3, Azure Static Web Apps, Google Cloud Platform, Digital Ocean App Platform or GitHub Pages. |