Skip to main content

A python library simplifying development of ipyvuetify voila apps

Project description

vvapp

A python library simplifying ipyvuetify voila application building.

Install

pip install vvapp

Inputs

vvapp is meant to be used in Jupyter, so launching jupyter first ($jupyter notebook).

There are a few key things to keep in mind when getting up and running with vvapp:

  • v_model
    • The value of vvapp inputs is set and accessed via the v_model attribute, following the ipyvuetify convention
  • class_
    • This is where you put vuetify.js class properties, like ma-4 to add margins around the input
  • style_
    • This is where you can add CSS to your elements
  • hint
    • The hint can be a string or a callable to provide input validation
    • If hint is a callable, it must return a string or None; if it returns a string, the input is marked as invalid and the string is displayed
from vvapp.inputs import __all__ as available_input_widgets
available_input_widgets
['password']

password

from vvapp.inputs import password
pw = password(label='Please enter a password',v_model='correcthorsebatterystapler')
pw

The value of of a vvapp widget is set/accessed by the v_model attribute, just like in ipyvuetify

pw.v_model
'correcthorsebatterystapler'
import re
def validate_pw(widget_value):
    if widget_value is None:
        return 'Input must not be None'

    else:
        if len(widget_value) < 12:
            return 'Too Short!'

        if len(widget_value) > 64:
            return 'Too Long!'

        if not re.match('[0-9]+',widget_value):
            return 'Must contain at least one number!'

    return None

pw = password(label='Please enter a password',v_model='correcthorsebatterystapler', hint=validate_pw)
pw

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

vvapp-0.0.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

vvapp-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file vvapp-0.0.1.tar.gz.

File metadata

  • Download URL: vvapp-0.0.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.8.0 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for vvapp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 90b3f27c7237b2c2e91b193e821d7ea5034d052fb900861538b30d5ec4ff6a2e
MD5 32f4f5ad1d6d419fd3f805f6f5956ce4
BLAKE2b-256 385c204f241d0388db788ac58169e7823584bebd12e4e0d4323fff54fb53c095

See more details on using hashes here.

File details

Details for the file vvapp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vvapp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.8.0 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for vvapp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb08a297b025030e07956902bc17242bbb6284646f91dd73fe0811afa6cef63
MD5 150d3374b31bb29ed7682bd0a8df3323
BLAKE2b-256 705254ab548d31b34e7cbb1b111ee43d24adb3a64647344cd7eb6c69cb5c4854

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