Giter VIP home page Giter VIP logo

flexx's Introduction

Flexx

Flexx is a pure Python toolkit for creating graphical user interfaces (GUI's), that uses web technology for its rendering. You can use Flexx to create desktop applications, web applications, and (if designed well) export an app to a standalone HTML document. It also works in the Jupyter notebook.

Being pure Python and cross platform, it should work anywhere where there's Python and a browser. To run apps in desktop-mode, we recommend having Firefox installed.

Flexx has a modular design, consisting of a few subpackages, which can also be used by themselves:

  • ui - the widgets
  • app - the event loop and server
  • react - reactive programming (how information flows through your program)
  • pyscript - Python to JavaScript transpiler
  • webruntime - to launch a runtime

Example

Working code example::

from flexx import app, ui, react
    
class Example(ui.Widget):
    
    def init(self):
        self.count = 0
        with ui.HBox():
            self.button = ui.Button(text='Click me', flex=0)
            self.label = ui.Label(flex=1)
    
    @react.connect('button.mouse_down')
    def _handle_click(self, down):
        if down:
            self.count += 1
            self.label.text('clicked %i times' % self.count)

main = app.launch(Example)
app.run()

Current status

Flexx is still very much a work in progress. Please don't go use it just yet for anything serious. The public API can change without notice. However, we're interested in feedback, so we invite you to play with it!

Getting started

  • clone the repo
  • put the repo dir in your PYTHONPATH
  • python setup.py install
  • run the examples

Demo server

There is an Amazon instance running some demos on http://52.21.93.28:8000/ (unless I turned it off for testing, etc.).

flexx's People

Contributors

almarklein avatar stonebig avatar andrewgrz avatar sesh avatar hittingsmoke avatar

Watchers

Imo Alexander avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.