{"id":15008854,"url":"https://github.com/epeios-q37/atlas-python","last_synced_at":"2025-05-15T11:08:19.764Z","repository":{"id":49731302,"uuid":"157746627","full_name":"epeios-q37/atlas-python","owner":"epeios-q37","description":"World's lightest toolkit to quickly and easily add a GUI to your Python programs and bring them online.","archived":false,"fork":false,"pushed_at":"2025-03-10T09:57:20.000Z","size":989,"stargazers_count":267,"open_issues_count":2,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-14T19:59:02.987Z","etag":null,"topics":["api","gpio","gui","jupyter","network","python","python2","python3","raspberry-pi","todomvc","web","webgpio"],"latest_commit_sha":null,"homepage":"http://atlastk.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epeios-q37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["epeios-q37"]}},"created_at":"2018-11-15T17:16:34.000Z","updated_at":"2025-04-04T21:31:19.000Z","dependencies_parsed_at":"2022-09-06T03:31:00.099Z","dependency_job_id":"d31bcd2c-665b-44ee-997b-f60ffd7d121e","html_url":"https://github.com/epeios-q37/atlas-python","commit_stats":{"total_commits":182,"total_committers":3,"mean_commits":"60.666666666666664","dds":0.01098901098901095,"last_synced_commit":"7f866480ed6cd169a8036a6bf005d5418ab7186f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fatlas-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fatlas-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fatlas-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epeios-q37%2Fatlas-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epeios-q37","download_url":"https://codeload.github.com/epeios-q37/atlas-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328384,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","gpio","gui","jupyter","network","python","python2","python3","raspberry-pi","todomvc","web","webgpio"],"created_at":"2024-09-24T19:21:04.436Z","updated_at":"2025-05-15T11:08:19.737Z","avatar_url":"https://github.com/epeios-q37.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\nThe *Atlas* toolkit is available for:\n\n[![Java](https://s.q37.info/jrnv4mj4.svg)](https://github.com/epeios-q37/atlas-java) [![Node.js](https://s.q37.info/fh7v7kn9.svg)](https://github.com/epeios-q37/atlas-node) [![Perl](https://s.q37.info/hgnwnnn3.svg)](https://github.com/epeios-q37/atlas-perl) [![Python](https://s.q37.info/94937nbb.svg)](https://github.com/epeios-q37/atlas-python) [![Ruby](https://s.q37.info/zn4qrx9j.svg)](https://github.com/epeios-q37/atlas-ruby)\n\nTo see the *Atlas* toolkit in action:\n\n[![Online demonstrations](https://img.shields.io/static/v1.svg?\u0026color=blue\u0026labelColor=red\u0026label=online\u0026message=demonstrations\u0026style=for-the-badge)](https://s.q37.info/sssznrb4)\n\n\u003c/div\u003e\n\n\u003e [*Zelbinium*](http://zelbinium.q37.info): IT for all (especially for teenagers).\n\u003e\n\u003e Use the *Atlas* toolkit to remotely control microcontrollers like the *ESP32*, *ESP8266*, *Raspberry Pi Pico (2) W*: [*UCUq*](https://s.q37.info/7zrtt9xc).\n\n# *Python* version of the *Atlas* toolkit\n\n\u003cdiv align=\"center\"\u003e\n\n[![Version 0.13](https://img.shields.io/static/v1.svg?\u0026color=90b4ed\u0026label=Version\u0026message=0.13\u0026style=for-the-badge)](http://github.com/epeios-q37/atlas-python/) [![license: MIT](https://img.shields.io/github/license/epeios-q37/atlas-python?color=yellow\u0026style=for-the-badge)](https://github.com/epeios-q37/atlas-python/blob/master/LICENSE) [![Documentation](https://img.shields.io/static/v1?label=documentation\u0026message=atlastk.org\u0026color=ff69b4\u0026style=for-the-badge)](https://atlastk.org) [![Version](https://img.shields.io/pypi/v/atlastk?style=for-the-badge\u0026color=90b4ed\u0026label=PyPi)](http://s.q37.info/9srmskcm)\n\n\u003c/div\u003e\n\n## A GUI with *Python* in a couple of minutes\n\nClick the animation to see a screencast of programming this [\"Hello, World!\" program](https://en.wikipedia.org/wiki/%22Hello,_World!%22_program) with *Python* in a matter of minutes:\n\n\u003cdiv align=\"center\"\u003e\n\n[![Building a GUI in with *Python* in less then 10 minutes](https://s.q37.info/qp4z37pg.gif)](https://s.q37.info/rt9wr4w3)\n\n\u003c/div\u003e\n\nSame video on [*Peertube*](https://en.wikipedia.org/wiki/PeerTube): \u003chttps://s.q37.info/qfcng9j4\u003e.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see the corresponding source code\u003c/summary\u003e\n\n```python\nimport atlastk\n \nBODY = \"\"\"\n\u003cfieldset\u003e\n \u003cinput id=\"Input\" xdh:onevent=\"Submit\" value=\"World\"/\u003e\n \u003cbutton xdh:onevent=\"Submit\"\u003eHello\u003c/button\u003e\n \u003chr/\u003e\n \u003cfieldset\u003e\n  \u003coutput id=\"Output\"\u003eGreetings displayed here!\u003c/output\u003e\n \u003c/fieldset\u003e\n\u003c/fieldset\u003e\n\"\"\"\n \ndef atk(dom): # Callback called on new connections.\n  dom.inner(\"\", BODY)\n  dom.focus(\"Input\")\n \ndef atkSubmit(dom): # Callback for the 'Submit' action, hence the name.\n  name = dom.getValue(\"Input\")\n  dom.begin(\"Output\", f\"\u003cdiv\u003eHello, {name}!\u003c/div\u003e\")\n  dom.setValue(\"Input\", \"\")\n  dom.focus(\"Input\")\n \natlastk.launch(globals=globals())\n```\n\n\u003c/details\u003e\n\n### See for yourself right now - it's quick and easy!\n\n```shell\n# You can replace 'github.com' with 'framagit.org' or 'gitlab.com'.\n# DON'T copy/paste this and above line!\ngit clone http://github.com/epeios-q37/atlas-python\ncd atlas-python/examples\npython Hello/\n```\n\n## *Android* devices\n\nApplications made with the *Atlas* toolkit work perfectly on your [*Android*](https://en.wikipedia.org/wiki/Android_(operating_system)) devices (smartphone or tablet) using the [*Termux*](https://termux.com/) application. Simply install (``pkg intall …``) the *git* and *python* packages. That's all!\n\n## *Jupyter* notebooks\n\nWhen using the *Atlas* toolkit in a [*Jupyter* notebook](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook), the GUI is embedded in the notebook, as shown here:\n\n\u003cdiv align=\"center\"\u003e\n\n![](https://s.q37.info/f7qqvhs3.gif)\n\n\u003c/div\u003e\n\n*Jupyter* notebook examples can be found in the *tutorials* directory.\n\n## Your turn\n\nIf you want to take your code to the next level, from [CLI](https://s.q37.info/cnh9nrw9) to [GUI](https://s.q37.info/hw9n3pjs), then you found the right toolkit.\n\nWith the [*Atlas* toolkit](http://atlastk.org/), you transform your programs in modern web applications ([*SPA*](https://s.q37.info/7sbmxd3j)) without the usual hassles:\n- no *JavaScript* to write; only *HTML*(/*CSS*) and *Python*,\n- no [front and back end architecture](https://s.q37.info/px7hhztd) to bother with,\n- no [web server](https://s.q37.info/n3hpwsht) (*Apache*, *Nginx*…) to install,\n- no need to deploy your application on a remote server,\n- no incoming port to open on your internet box or routeur.\n\nThe *Atlas* toolkit is written in pure *Python*, with no native code and no dependencies, allowing the *Atlas* toolkit to be used on all environments where *Python* is available. \n\nAnd simply by running them on a local computer connected to internet, applications using the *Atlas* toolkit will be accessible from the entire internet on laptops, smartphones, tablets…\n\nThe *Atlas* toolkit is particularly well suited for educational purposes, to write modern programming exercises, i.e. with a true graphical interface instead of the usual old-looking textual one. More about this can be found [here](https://s.q37.info/cbms43s9).\n\n*Python* is much more powerful then *Excel* macros to automate (boring) tasks, and you can also work with *PDF*, *Word*, *Google* files…. And with the *Atlas* toolkit, you have much more possibilities then with *VBA* forms. There are some examples [here](https://s.q37.info/97p44nh4).\n\n\u003e You will also find programs from [*The Big Book of Small Python Projects*](https://inventwithpython.com/bigbookpython/) by [Al Sweigart](http://alsweigart.com) to which a graphical user interface using the *Atlas* toolkit were added in this repository: [epeios-q37/AlSweigartTheBigBookPython](https://s.q37.info/kd3bwchj).\n\n## Content of the repository\n\nThe `atlastk` directory contains the *Python* source code of the *Atlas* toolkit, which is the directory you have to reference in `PYTHONPATH` in order to use the *Atlas* toolkit in your own program, unless you have installed the [*atlastk* package](http://s.q37.info/9srmskcm) (`pip install atlastk`…).\n\nYou can also retrieve the `atlastk.zip` file, and add to your source code :\n\n```python\n__import__(\"sys\").path.append(\"\u003cpath to\u003e/atlastk.zip\")\n\nimport atlastk\n```\n\nIf the `atlastk.zip` file is in the current folder, replace `\u003cpath-to\u003e/atlastk.zip` with `./atlastk.zip` and not only `atlastk.zip`.\n\nIn the `examples` directory, you will found following examples:\n\n- `Blank`: very basic example,\n- `Hello`: [\"*Hello, World!*\"](https://en.wikipedia.org/wiki/%22Hello,_World!%22_program),\n- `Chatroom`: multi-user chatroom,\n- `Notes`: note taking program,\n- `TodoMVC`: [*TodoMVC*](http://todomvc.com/),\n- `Hangman`: [Hangman game](http://s.q37.info/gtdtk4hp),\n- `15-puzzle`: [15-puzzle game](https://s.q37.info/jn9zg3bn),\n- `Contacts`: a basic address book, \n- `Widgets`: some widgets handled with the *Atlas* toolkit,\n- `Chatrooms` : same as above `Chatroom`, but with several rooms,\n- `PigGame`: [Pig game](https://en.wikipedia.org/wiki/Pig_(dice_game)) for one or two players,\n- `Reversi`: [*Reversi* game](http://s.q37.info/zz3dzmf7) for one or two players,\n- `MatPlotLib` : the *Atlas* toolkit displaying some graphics made with [*matplotlib*](https://matplotlib.org/); this example needs, of course, the *matplotlib* package to be installed…\n\nOther examples are detailed in the next section.\n\nExcept for the *ErgoJr*, *GPIO* and *RGB* applications, which are detailed in the next section, to run an example, launch, from within the `examples` directory, `python \u003cName\u003e/` (don't forget the final `/`), where `\u003cName\u003e` is the name of the example (`Blank`, `Chatroom`…).\n\nThe *Stars* application is an example where the *Atlas* *toolkit* is used to control a [*Pygame*](https://en.wikipedia.org/wiki/Pygame) based application. Of course, *Pygame* needs to be installed.\n\nThe `tutorials` directory contains some [*Jupyter* notebooks](https://en.wikipedia.org/wiki/Project_Jupyter#Jupyter_Notebook) about  the *Atlas* *toolkit*.\n\n## *Raspberry Pi*/*ODROID-C2*\n\n**If the applications does not work on your *Raspberry Pi*, please see this issue: \u003chttps://github.com/epeios-q37/atlas-python/issues/1\u003e**\n\nThe *GPIO* and *RGB* applications are designed to be used on a *Raspberry Pi* or a *ODROID-C2*.\n\nHere is how the *WebGPIO* application looks like:\n\n\u003cdiv align=\"center\"\u003e\n\n![*WebGPIO* interface](https://s.q37.info/htkhqb9x.png)\n\n\u003c/div\u003e\n\nFor the *Raspberry Pi*, the `RPi.GPIO` *Python* module have to be installed (this is probably already the case).\n\nFor the *ODROID-C2*, The *Python* version of *WiringPi* must be installed, and the application has to be launched, from within the `examples` directory, with `sudo` (`sudo python GPIO/` or `sudo python RGB/`).\n\nThe *ErgoJr* application is experimental and to control a *Poppy* *Ergo Jr* robot.\n\nThe *RGB* application is dedicated to the control of a RGB led, and the *GPIO* (aka *WebGPIO*) application allows to control the basic pins. Click below picture to see a *YouTube* video on how they work (same video on [*PeerTube*](https://en.wikipedia.org/wiki/PeerTube): \u003chttps://s.q37.info/49pbmwv9\u003e):\n\n\u003cdiv align=\"center\"\u003e\n\n[![RGB video](https://img.youtube.com/vi/C4p2iX6gc-Q/0.jpg)](https://www.youtube.com/watch?v=C4p2iX6gc-Q)\n\n\u003c/div\u003e\n\n\n","funding_links":["https://github.com/sponsors/epeios-q37"],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Fatlas-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepeios-q37%2Fatlas-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepeios-q37%2Fatlas-python/lists"}