Skip to main content

vbuild

"Compile" your VueJS components (*.vue) to standalone html/js/css ... python only, no need of nodejs. And you can use python components with vbuild, in your vue/sfc files !!!

It's just an utility to generate HTML(template), SCRIPT and STYLE from a VUE/SFC component (*.vue). It won't replace webpack/nodejs/vue-cli, it fills the "Sometimes you have to work with the tools you have, not the ones you want." gap.

DEMO

Available on pypi

Changelog

Features

import vbuild

c=vbuild.render("mycompo.vue")
#c=vbuild.render("vues/*.vue")
#c=vbuild.render( "c1.vue", "c2.vue" )
#c=vbuild.render( "c1.vue", "vues/*.vue" )

print( c.html )
print( c.script )
print( c.style )

#or 

print( c ) # all stuff in html tags

Main Goal

Its main purpose is to let you use components (.vue files) in your vuejs app, without a full nodejs stack. It's up to you to create your generator, to extract the things, and create your "index.html" file. It's a 4 lines of python code; example:

import vbuild
buf=readYourTemplate("index.tpl") # should contains a tag "<!-- HERE -->" that would be substituted
buf=buf.replace("<!-- HERE -->",str( vbuild.render( "vues/*.vue" ) ) )
writeYourTemplate("index.html",buf)

(a real example of rendering vue/sfc components, using vbuild and the marvelous wuy)

Vue/sfc component compatibility

All classical JS vue/sfc components are compatibles. But now, you can use python component too.

Here is, side by side, the same component (in js, and in python):

To use the full features of vbuild

If you want to use the full features, you'll need to install the optionnal's libs.

sudo pip install pyscss lesscpy closure

All theses libs works with py2 and/or py3, and you could use the css-pre-processors SASS and LESS, and closure to minify js.

TODO

Release files for vbuild 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vbuild 0.8.0
File Size Uploaded
vbuild-0.8.0.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vbuild 0.8.0
File Interpreter ABI Platform
vbuild-0.8.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.0 kB

Release files / vbuild-0.8.0.tar.gz

Download URL vbuild-0.8.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6149ad88070f044a81fc258d96aebb809fa821e7638745cdaa3a9eb3a4fac43b
BLAKE2b-256 checksum
How to use checksums
5504b406334dc34a62dc52a44ea1e8e43781960436d2fe9e6da01bb64b55c903
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.7.1 Linux/4.15.0-45-generic

Release files / vbuild-0.8.0-py2.py3-none-any.whl

Download URL vbuild-0.8.0-py2.py3-none-any.whl
Size 22.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6822d5791b86e4c62c0963f13c00cc295db29764356cce4c62cb3100135f1199
BLAKE2b-256 checksum
How to use checksums
921b316e19bce0dbd38d9b4d3a7bb4d00a6191dd5f7a7e32e1fcbb5c4009e64e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.7.1 Linux/4.15.0-45-generic

Release history Release notifications | RSS feed

0.8.2

2 release files

0.8.1

2 release files

This release

0.8.0 This release

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.3

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page