Snakeify is a service that auto-generates fullstack websites for download. The REST API uses standard HTTPS calls in JSON format for all requests and responses.
Just getting started? Check out our Quick Start guide for basic templates and working UI components demo downloads. |
Snakeify uses API tokens for access to the API. You can find the API token in your Account → Settings page. The REST API requires your access token to be included with each request call. A simple Test API request is provided to verify your account access.
All examples are shown using basic Linux/Mac cURL terminal window commands, but can also be called by other methods. |
The Layout API request is used for raw layout planning of page user interface (UI) components within a 12-column grid.
A minimal set of parameters are used for each item's layout coordinates, width and height. Detailed parameters for styling and text/image content are part of the Build API request.
Parameters pages array of hashes An array of website hash page entries containing UI components. component_type array of hashes The button component array is shown as an example. The complete list of component types is under the Web Components section. x integer y integer w integer h integer The upper-left page corner is defined as x = 0 and y = 0. The w and h values (width & height limits) are component-specific. More button layouts can be added with new { x, y, w, h } entries. |
The Build API request is used to generate multi-page websites with both frontend and backend files. The response returns a unique URL link to download the custom snakeify.zip file.
Parameters pages array of hashes An array of website pages. Each page is a comma-separated hash entry. page_name string The name of each unique web page entry. title_bar string (optional) The browser's title bar text for the web page entry. If this line is omitted, the title bar will be blank. component_type array of hashes The button component array is shown as an example. More button components can be added with new comma-separated hash entries. The complete reference of UI parameters is in Web Components. |
The backend consists of Python files matching each frontend page name. Every page's Python callback function is called when its button is clicked. For example, a clicked /index page calls its associated index.py file.
Your own custom code can be added to process incoming UI parameters. These parameter values can be directly modified in real-time by your code. The button component parameters are described below. |
Checkbox parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters checkbox array of hashes Comma-separated hash list of checkbox instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 2. The height h = 1 to 2. text string The visible text above the checkbox. state boolean The checkbox state (true or false). |
Segment button parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters segment_btn array of hashes Comma-separated hash list of segment button instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 4 to 6. The height h = 1 to 2. text string The visible text above the segment button. list array of strings Comma-separated list of segment text labels. The maximum size is 5. sel integer The selected button segment index, where sel = 0 to 4. |
Slider parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters slider array of hashes Comma-separated hash list of slider instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 3. The height h = 1 to 2. text string The visible text above the slider. percent integer The slider position percentage from 0 to 100. |
Toggle switch parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters toggle array of hashes Comma-separated hash list of toggle switch instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 2. The height h = 1 to 2. text string The visible text above the toggle switch. state boolean The toggle switch state (true or false). |
Text input parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters text_input array of hashes Comma-separated hash list of text input instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 2 to 3. The height h = 1 to 2. text string The visible text above the input box. Default text can be pre-filled. input string The user's text input string. type string (optional) An optional non-empty string is used to select special input types. |
Image parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters image array of hashes Comma-separated hash list of image instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 6. The height h = 1 to 6. source string The URL path of the image source. |
Text output parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters text_output array of hashes Comma-separated hash list of text output instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 6. The height h = 1 to 6. title string The text output main title. text string The text output main content. |
Card parameters can be read or dynamically modified by Python callbacks, but a button must be pressed to invoke the code.
Parameters card array of hashes Comma-separated hash list of card instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 2 to 3. The height h = 2 to 6. image string (optional) The URL path of the card image source. title string (optional) The card main title text. subt string (optional) The card main subtitle text. text string (optional) The card main content text. button array of strings (optional) String entries define button text. url array of strings (optional) Optional non-empty strings redirect button clicks to other pages. |
The divider component helps group related page content. The horizontal or vertical orientation is based on its relative width and height ratio.
Divider parameters can be read or dynamically modified by Python callbacks, but a button must exist on the same page to invoke the code.
Parameters divider array of hashes Comma-separated hash list of divider instances. x integer y integer w integer h integer Coordinates x and y, where x = 0 to 11. The width w = 1 to 6. The height h = 1 to 6. weight integer The divider line thickness. |