Python version of the Atlas toolkit
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3c7f835 Dec 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Atlas 13/12/2018 09:43:17 Dec 13, 2018
Blank 13/12/2018 09:43:17 Dec 13, 2018
Chatroom 13/12/2018 09:43:17 Dec 13, 2018
GPIO 13/12/2018 09:43:17 Dec 13, 2018
Hello 13/12/2018 09:43:17 Dec 13, 2018
Notes 13/12/2018 09:43:17 Dec 13, 2018
TodoMVC 13/12/2018 09:43:17 Dec 13, 2018
Atlas.python.zip 14/12/2018 16:02:48 Dec 14, 2018
CHANGELOG.md 14/12/2018 16:02:48 Dec 14, 2018
LICENSE 15/11/2018 18:22:41 Nov 15, 2018
README.md 14/12/2018 16:02:48 Dec 14, 2018

README.md

Python version of the Atlas toolkit

Python logo

The Atlas toolkit is a library dedicated to the handling of web interfaces.

Hello, World!

Here's how a Hello, World! type application made with the Atlas toolkit looks like:

Little demonstration

For an live demonstration: http://q37.info/runkit/Hello.

Source code:

# Following two lines can be removed if the 'Atlas.python.zip' file is referenced in 'PYTHONPATH'
import os, sys
sys.path.append("Atlas.python.zip") # Add the path to 'Atlas.python.zip' if needed.

import Atlas

def acConnect(this, dom, id):
  dom.setLayout("", body )
  dom.focus( "input")

callbacks = {
  "": acConnect,
  "Typing": lambda this, dom, id:
    dom.setContent("name", dom.getContent(id)),
  "Clear": lambda this, dom, id:
    dom.setContents( {  "input": "", "name": ""} )
    if dom.confirm( "Are you sure ?" ) else None
}
  
head = """
<title>"Hello, World !" example</title>
<style type="text/css">
 html, body { height: 100%; padding: 0; margin: 0; }
 .vcenter-out, .hcenter { display: table; height: 100%; margin: auto; }
 .vcenter-in { display: table-cell; vertical-align: middle; }
</style>
"""

body = """
<div class="vcenter-out">
 <div class="vcenter-in">
  <fieldset>
   <label>Name:</label>
   <input id="input" maxlength="20" placeholder="Enter your name here" type="text" data-xdh-onevent="input|Typing" />
   <button data-xdh-onevent="Clear">Clear</button>
   <hr />
   <h1>
    <span>Hello </span>
    <span style="font-style: italic;" id="name"></span>
    <span>!</span>
   </h1>
  </fieldset>
 </div>
</div>
"""

Atlas.launch(callbacks, lambda: None, head)

TodoMVC

And here's how the Atlas toolkit version of the TodoMVC application looks like:

TodoMVC

For an live demonstration: http://q37.info/runkit/TodoMVC.

Content of the repository

The Atlas directory contains the Python source code of the Atlas toolkit, which is not needed to run the examples.

Atlas.python.zip is the file you have to reference in PYTHONPATH in order to use the Atlas toolkit in your own application.

All other directories are examples.

To run an example, launch python <Name>, where <Name> is the name of the example (Blank, Chatroom…).

The GPIO application was designed to be used on a Odroid C2. Although it may be work on other systems, like Raspberry Pi, this application was only tested on a Odroid C2. The Python version of WringPi must be installed, and the application has to be launched with sudo. Here a video to see how it works:

GPIO video

Same video on a PeerTube instance: https://peertube.video/videos/watch/4028de7d-267d-4ecb-a13f-7745171ba5ae

The Atlas toolkit is also available for:

For more information about the Atlas toolkit, go to http://atlastk.org/.