All Projects → Andrew-Shay → Neuron

Andrew-Shay / Neuron

Licence: mit
Python project for creating desktop applications with HTML and Javascript

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Neuron

Pi Apps
Raspberry Pi App Store for Open Source Projects
Stars: ✭ 277 (+222.09%)
Mutual labels:  installer, gui
Laravel Paket
Composer GUI. Manage Laravel dependencies from web interface without switching to command line!
Stars: ✭ 143 (+66.28%)
Mutual labels:  installer, gui
Nplusminer
NPlusMiner + GUI | NVIDIA/AMD/CPU miner | AI | Autoupdate | MultiRig remote management
Stars: ✭ 75 (-12.79%)
Mutual labels:  gui
Project
⭐️ Antares Project Application Skeleton. This is the very first place you should start. It allows you to create a brand new awesome project in easy few steps.
Stars: ✭ 84 (-2.33%)
Mutual labels:  installer
Clr Installer
Clear Linux* OS Installer
Stars: ✭ 80 (-6.98%)
Mutual labels:  installer
Getchromium
Installs the latest build of Chromium on Android & Chrome OS.
Stars: ✭ 77 (-10.47%)
Mutual labels:  installer
Ui
Cross-platform UI library written in V
Stars: ✭ 1,223 (+1322.09%)
Mutual labels:  gui
Pyrustic
Lightweight framework and software suite to help develop, package, and publish Python desktop applications
Stars: ✭ 75 (-12.79%)
Mutual labels:  gui
Bumblebee
🚕 A spreadsheet-like data preparation web app that works over Optimus (pandas, dask, cuDF, dask-cuDF and PySpark)
Stars: ✭ 86 (+0%)
Mutual labels:  gui
Abr Broadcaster
A real time encoder for Adaptive Bitrate Broadcast
Stars: ✭ 80 (-6.98%)
Mutual labels:  gui
Qode
Qode is a lightly modified fork of Node.js that merges Node's event loop with Qt's event loop. It is designed to be used together with @nodegui/nodegui.
Stars: ✭ 84 (-2.33%)
Mutual labels:  gui
Android Sdk Installer
Linux utility which aims to automatically install and configures Android SDK, Eclipse ADT Plugin, adds hardware support for devices and enables full MTP support.
Stars: ✭ 78 (-9.3%)
Mutual labels:  installer
Ptdesigner
Library and GUI tool for designing and generation of procedural textures, made as a part of my Bachelor thesis.
Stars: ✭ 77 (-10.47%)
Mutual labels:  gui
Patternfly Design
Use this repo to file all new feature or design change requests for the PatternFly project
Stars: ✭ 82 (-4.65%)
Mutual labels:  gui
Chrysalisp
Parallel OS, with GUI, Terminal, OO Assembler, Class libraries, C-Script compiler, Lisp interpreter and more...
Stars: ✭ 1,205 (+1301.16%)
Mutual labels:  gui
Imgui Rs
Rust bindings for Dear ImGui
Stars: ✭ 1,258 (+1362.79%)
Mutual labels:  gui
Corewar
School 42 project // Implementation of programming game “Core War” [Champions + Assembler + Disassembler + Virtual Machine + Visualizer]
Stars: ✭ 76 (-11.63%)
Mutual labels:  gui
Githacktools
The best Hacking and PenTesting tools installer on the world
Stars: ✭ 78 (-9.3%)
Mutual labels:  installer
Magicgui
build GUIs from python functions, using magic.
Stars: ✭ 80 (-6.98%)
Mutual labels:  gui
Gnvim
GUI for neovim, without any web bloat
Stars: ✭ 1,271 (+1377.91%)
Mutual labels:  gui

Gitter

Neuron

Neuron is a Python project that allows an application's GUI to be built with HTML and Javascript.
It's simply a sample project that is ready to be downloaded and modified to become YOUR application.
This project just combines different projects together with an installer.

CEF Python, wxPython, Flask

wxPython - Windowing
CEF Python - Portable browser
Flask - Local web server
Gevent - Launches Flask
Bootstrap - Web UI
xmlhttprequest - Communication with Flask to update UI

How to Use

Get Started

Clone

Clone this repo

Setup Environment

Python 3.7

pip install -r requirements

Test Application

cd into the repo folder.
Start the application to make sure everything is working python -m neuron
The application comes with a sample GUI with some interactions with the backend.
The included HTML and Javascript functions are a sample of how actions can be performed.

Understanding Structure

__main__.py

Starts the application. It is a cefpython (portable chrome browser) application, and the windowing system.
It calls a function called find_port() which finds an open port on the local machine.
It then calls the function start_server() which starts the Flask web server.

start_gevent.py

This file is used to run gevent which handles running Flask and the incoming connections from your web gui.
start_gevent is importing the Flask application from app.py

app.py

This is the Flask application. This is where routing for http calls will be, creating the HTML, and the backend of the application.
This is where main part of the application is handled.

__info__.py

Fields that contain your application name and related information.

__init__.py

Configures paths for the application.
Contains functions for getting and creating paths for your application.

Templates directory

Contains the HTML files for the application

Static directory

Contains the resources for the HTML files. Fonts, images, javascript libraries etc.

Rebrand Project

Windowing and Icons

The top of __main__.py sets the size of the application.
icon.ico is the icon used by the window.

When creating an icon, you can bundle multiple sizes together to ensure it appears nicely at different sizes.
You can download icobundle to combine the icons into one file.
You can use this command. It also shows the different sizes you should create (eg icon24.ico is the 24x24 pixels size)
.\icobundl.exe -o icon.ico icon16.ico icon24.ico icon32.ico icon40.ico icon48.ico icon64.ico icon96.ico icon128.ico icon256.ico

Name, version etc

Modify __info__.py

Modifying the Application

After rebranding the project, development on the new application can begin.

Main Program Logic

app.py is the Flask application that controls the main logic of the application.
Sample AJAX functions are included in the HTML to communicate with the backend Flask application.

GUI

Bootstrap is used for the HTML. This is not required, any HTML can be used.
Modifying the files in the templates and static directories will allow you change the GUI.
You call run python app.py and go to localhost:5000 in your browser to work on your application without having to execute __main__.py.
templates/index.html contains Javascript calls to the backend to retrieve data.

Create Windows Executable and Installer

PyInstaller and exe

An exe for the application is created with PyInstaller.
build/build.spec is the PyInstaller spec which configures PyInstaller.
Extra files and directories to include (eg icon.ico) are set in the spec file.
To prevent the console window from appearing set EXE(console=False).

NSIS installer

Install NSIS http://nsis.sourceforge.net/Download

The installer is created with nsis.
build/installer.nsi is the template that will be automatically modified when creating a new build.
Modify build/icon.ico and build/header.bmp for your application.
Modify build/license.txt to be the contents of your application's license.
Modify the fields at the top of build/build.py

Create new build

$ cd build/
$ python build.py

This will run pyinstaller to create the exe, copy it into build/dist/, and then create the installer with nsis.
A file containing multiple hashes of the installer is also created.

Notes

  • requirements.txt minimum versions show what was tested with

References

CEFPython - Python bindings for the Chromium Embedded Framework
Flask - Python microframework
Bootstrap - Web Front-End Framework
PyInstaller - Turn Python projects into executables
NSIS - Creates installer

Screenshot

Neuron Screenshot

License

The license for this project is the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].