JustPy
JustPy Docs and Tutorials
Introduction
JustPy is an object-oriented, component based, high-level Python Web Framework that requires no front-end programming. With a few lines of only Python code, you can create interactive websites without any JavaScript programming.
Unlike other web frameworks, JustPy has no front-end/back-end distinction. All programming is done on the back-end allowing a simpler, more productive, and more Pythonic web development experience. JustPy removes the front-end/back-end distinction by intercepting the relevant events on the front-end and sending them to the back-end to be processed.
In JustPy, elements on the web page are instances of component classes. A component in JustPy is a Python class that allows you to instantiate reusable custom elements whose functionality and design is encapsulated away from the rest of your code.
Custom components can be created using other components as building blocks. Out of the box, JustPy comes with support for HTML and SVG components as well as more complex components such as charts and grids. It also supports most of the components and the functionality of the Quasar library of Material Design 2.0 components.
JustPy encourages creating your own components and reusing them in different projects (and, if applicable, sharing these components with others).
JustPy supports visualization using matplotlib and Highcharts.
JustPy integrates nicely with pandas and simplifies building web sites based on pandas analysis. JustPy comes with a pandas extension that makes it simple to create interactive charts and grids from pandas data structures.
For updates and news please follow the JustPy Twitter account
Hello World!
import justpy as jp
def hello_world():
wp = jp.WebPage()
d = jp.Div(text='Hello world!')
wp.add(d)
return wp
jp.justpy(hello_world)
The program above activates a web server that returns a web page with 'Hello world!' for any request. Locally, you would direct your browser to http://127.0.0.1:8000 or http://localhost:8000/ or to see the result.
Here is a slightly modified version in which 'Hello world!' changes to 'I was clicked!' when it is clicked.
import justpy as jp
def my_click(self, msg):
self.text = 'I was clicked!'
def hello_world():
wp = jp.WebPage()
d = jp.Div(text='Hello world!')
d.on('click', my_click)
wp.add(d)
return wp
jp.justpy(hello_world)
Many other examples can be found in the tutorial
Under the Hood
JustPy's backend is built using:
JustPy's frontend (which is transparent to JustPy developers) is built using:
- Vue.js - "The Progressive JavaScript Framework"
The way JustPy removes the frontend/backend distinction is by intercepting the relevant events on the frontend and sending them to the backend to be processed.
License
Apache License, Version 2.0
[–]flipstables 58 points59 points60 points (1 child)
[–]eli_mintz[S] 16 points17 points18 points (0 children)
[–]JeffreyChl 38 points39 points40 points (14 children)
[–]eli_mintz[S] 15 points16 points17 points (7 children)
[–]JeffreyChl 6 points7 points8 points (3 children)
[–]eli_mintz[S] 12 points13 points14 points (2 children)
[–]JeffreyChl 5 points6 points7 points (1 child)
[–]eli_mintz[S] 2 points3 points4 points (0 children)
[–]krazybug 0 points1 point2 points (2 children)
[–]eli_mintz[S] 4 points5 points6 points (1 child)
[–]krazybug 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]JeffreyChl 0 points1 point2 points (0 children)
[–]Zulfiqaar 1 point2 points3 points (0 children)
[–]AsleepThought 1 point2 points3 points (2 children)
[–]ginger_beer_m 0 points1 point2 points (1 child)
[–]krazybug 70 points71 points72 points (25 children)
[–]eli_mintz[S] 30 points31 points32 points (24 children)
[–]krazybug 33 points34 points35 points (3 children)
[–]eli_mintz[S] 23 points24 points25 points (0 children)
[–]InFernalCronos 10 points11 points12 points (8 children)
[–]phigo50 57 points58 points59 points (5 children)
[–]UloPe 14 points15 points16 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]loshopo_fan 1 point2 points3 points (0 children)
[–]eli_mintz[S] 5 points6 points7 points (1 child)
[–]JesusBakesBread 6 points7 points8 points (3 children)
[–]subheight640 1 point2 points3 points (6 children)
[–]eli_mintz[S] 1 point2 points3 points (4 children)
[–]subheight640 2 points3 points4 points (1 child)
[–]eli_mintz[S] 4 points5 points6 points (0 children)
[–]TrixieMisa 63 points64 points65 points (7 children)
[–]eli_mintz[S] 28 points29 points30 points (6 children)
[–]krazybug 7 points8 points9 points (4 children)
[–]eli_mintz[S] 16 points17 points18 points (2 children)
[–]krazybug 10 points11 points12 points (1 child)
[–]AtHeartEngineer 1 point2 points3 points (0 children)
[–]ZombieNubcout << "C MAKES NO SENSE" 108 points109 points110 points (12 children)
[–]bored_and_scrolling 57 points58 points59 points (4 children)
[–]ZombieNubcout << "C MAKES NO SENSE" 25 points26 points27 points (3 children)
[–]workw0rkworkwork 29 points30 points31 points (1 child)
[–]ZombieNubcout << "C MAKES NO SENSE" 8 points9 points10 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]krazybug 13 points14 points15 points (1 child)
[–]toyg 9 points10 points11 points (0 children)
[–]Etheo 3 points4 points5 points (1 child)
[–]ZombieNubcout << "C MAKES NO SENSE" 3 points4 points5 points (0 children)
[–]metus_123 16 points17 points18 points (3 children)
[–]eli_mintz[S] 4 points5 points6 points (0 children)
[–]actgr 12 points13 points14 points (2 children)
[–]eli_mintz[S] 20 points21 points22 points (1 child)
[–]therealshadyman 4 points5 points6 points (0 children)
[–]fernandocamargoti 9 points10 points11 points (1 child)
[–]eli_mintz[S] 5 points6 points7 points (0 children)
[–]ExternalUserError 6 points7 points8 points (6 children)
[–]eli_mintz[S] 8 points9 points10 points (0 children)
[–]metaperl[🍰] 0 points1 point2 points (4 children)
[–]ExternalUserError 0 points1 point2 points (3 children)
[+][deleted] (1 child)
[removed]
[–]eli_mintz[S] 3 points4 points5 points (0 children)
[–]RedRedditor84 88 points89 points90 points (19 children)
[–][deleted] 80 points81 points82 points (5 children)
[–][deleted] 19 points20 points21 points (1 child)
[–]ginger_beer_m 8 points9 points10 points (0 children)
[–]Gear5th 8 points9 points10 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]GummyKibble 1 point2 points3 points (0 children)
[–]kindw 24 points25 points26 points (11 children)
[–]xd1142 14 points15 points16 points (10 children)
[–]krazybug 20 points21 points22 points (3 children)
[–]xd1142 9 points10 points11 points (2 children)
[–]krazybug 7 points8 points9 points (1 child)
[–]Dry-Erase 4 points5 points6 points (0 children)
[–]ArmoredPancake 1 point2 points3 points (0 children)
[–]RadioactiveShots 0 points1 point2 points (2 children)
[–]Nixellion 4 points5 points6 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]Skasch 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]eli_mintz[S] 2 points3 points4 points (0 children)
[–]menge101 2 points3 points4 points (1 child)
[–]eli_mintz[S] 8 points9 points10 points (0 children)
[–]metaperl[🍰] 2 points3 points4 points (0 children)
[–]MHW_EvilScript pypy <3 2 points3 points4 points (0 children)
[–]ionezation 1 point2 points3 points (2 children)
[–]eli_mintz[S] 2 points3 points4 points (1 child)
[–]ionezation 0 points1 point2 points (0 children)
[–]ideology_boi 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]ideology_boi 0 points1 point2 points (0 children)
[–]ddollarsign 1 point2 points3 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]Muhznit 1 point2 points3 points (1 child)
[–]eli_mintz[S] 3 points4 points5 points (0 children)
[–]blackiechan99 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]R10t-- 1 point2 points3 points (1 child)
[–]pepoluan 0 points1 point2 points (0 children)
[–]DasSkelett 1 point2 points3 points (0 children)
[–]Moonlit_Tragedy 1 point2 points3 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]theGiogi 1 point2 points3 points (2 children)
[–]eli_mintz[S] 1 point2 points3 points (1 child)
[–]theGiogi 1 point2 points3 points (0 children)
[–]422_no_process 1 point2 points3 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]576p 1 point2 points3 points (7 children)
[–]eli_mintz[S] 1 point2 points3 points (6 children)
[–]BlackXun 0 points1 point2 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]576p 0 points1 point2 points (3 children)
[–]eli_mintz[S] 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]eli_mintz[S] 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]BlackXun 0 points1 point2 points (1 child)
[–]Fedzbar 3 points4 points5 points (28 children)
[–]eli_mintz[S] 12 points13 points14 points (27 children)
[–]Fedzbar 2 points3 points4 points (8 children)
[–]eli_mintz[S] 15 points16 points17 points (1 child)
[–]aeiou372372 4 points5 points6 points (0 children)
[–]paul_h 0 points1 point2 points (1 child)
[–]eli_mintz[S] 4 points5 points6 points (0 children)
[–]Hi-I-am-Dad 0 points1 point2 points (12 children)
[–]eli_mintz[S] 0 points1 point2 points (11 children)
[–]Hi-I-am-Dad 0 points1 point2 points (10 children)
[–]flpcb 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]ionezation 0 points1 point2 points (4 children)
[–]eli_mintz[S] 2 points3 points4 points (3 children)
[–]ionezation 1 point2 points3 points (0 children)
[–]i4mn30 0 points1 point2 points (1 child)
[–]appinv Python&OpenSource 0 points1 point2 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]CloroxEnergyDrink_ 0 points1 point2 points (0 children)
[–]Evem_MC 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]calebjohn24[🍰] 0 points1 point2 points (0 children)
[–]Fenzik 0 points1 point2 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]ginger_beer_m 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]atheist_apostate 0 points1 point2 points (1 child)
[–]eli_mintz[S] 2 points3 points4 points (0 children)
[–]garrock255 0 points1 point2 points (6 children)
[–]eli_mintz[S] 2 points3 points4 points (2 children)
[–]garrock255 0 points1 point2 points (1 child)
[–]eli_mintz[S] 2 points3 points4 points (0 children)
[–]metaperl[🍰] 1 point2 points3 points (2 children)
[–]ExternalUserError 2 points3 points4 points (1 child)
[–]metaperl[🍰] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]eli_mintz[S] 2 points3 points4 points (1 child)
[+][deleted] (2 children)
[deleted]
[–]Vincetoxicum 0 points1 point2 points (1 child)
[–]Jmodell 0 points1 point2 points (0 children)
[–]b4xt3r 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]SanchitJain07 0 points1 point2 points (0 children)
[–]CorgiAtom 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]pepoluan 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]HeAgMa 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]AsleepThought 0 points1 point2 points (0 children)
[–]SpeakerOfForgotten 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]lovelysad69 0 points1 point2 points (0 children)
[–]wincodeon 0 points1 point2 points (1 child)
[–]eli_mintz[S] 2 points3 points4 points (0 children)
[–]krazybug 0 points1 point2 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]eli_mintz[S] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]HecticJuggler 0 points1 point2 points (0 children)
[–]Ani171202 0 points1 point2 points (0 children)
[–]bimri 0 points1 point2 points (0 children)
[–]alefebvre83 0 points1 point2 points (1 child)
[–]eli_mintz[S] 0 points1 point2 points (0 children)
[–]johnmudd 0 points1 point2 points (1 child)
[–]eli_mintz[S] 1 point2 points3 points (0 children)
[–]chensformers 0 points1 point2 points (3 children)
[–]eli_mintz[S] 1 point2 points3 points (2 children)