Skip to main content

JustPy is an object-oriented, component based, high-level Python Web Framework that requires no front-end programming

Project description

JustPy

pypi Github Actions Build PyPI Status Downloads GitHub issues GitHub closed issues License

Docs and Tutorials

JustPy Docs and Tutorials

Live Demos

nicegui justpy demos

Questions and Discussions

Please file Bugs you found checking the issues Badge Link above.

Questions which involve details of upstream frameworks such as Quasar, Tailwind, Highcharts are best ask involving a larger community via

stackoverflow questions

and tagging your question with both "justpy" and the tag or the specific library your are asking a question for

Our github dicussions are categorized. Please use the Category "Ideas" for feature requests. github discussions

Trying out with docker

git clone https://github.com/elimintz/justpy
scripts/rundocker -h
scripts/rundocker test
scripts/rundocker example dogs
scripts/rundocker dev

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. JustPy can also be used to create graphic user interfaces for Python programs.

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

Copyright (c) 2019-2022, Eliezer Mintz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

justpy-0.2.8.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

justpy-0.2.8-py2.py3-none-any.whl (4.5 MB view details)

Uploaded Python 2Python 3

File details

Details for the file justpy-0.2.8.tar.gz.

File metadata

  • Download URL: justpy-0.2.8.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for justpy-0.2.8.tar.gz
Algorithm Hash digest
SHA256 b6b34c773accc4f1b5d9fa9b13862da9b13aa38894b764d5fd2e324281a53675
MD5 51fd98448eab6fbc21c55ba19b7be5d7
BLAKE2b-256 02120450004dc875b7f9f92d81f10aa9e2c08eb858717252423a9af2247840f7

See more details on using hashes here.

File details

Details for the file justpy-0.2.8-py2.py3-none-any.whl.

File metadata

  • Download URL: justpy-0.2.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for justpy-0.2.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b47f6c844800f704ca1e25b92770de6fc5ec5d076368aefef505de640064641d
MD5 ea725b59b1b719284a5ef6bd0d1c483e
BLAKE2b-256 105b168703db3ebeedd62051d496902d1cb54e8b8cf795a1dfac8634267937a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page