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

Metadata

Release files for vbuild 0.8.2

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.2
File Size Uploaded
vbuild-0.8.2.tar.gz 8.9 kB Details

Built distribution (wheel)

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

Total release size: 18.3 kB

Release files / vbuild-0.8.2.tar.gz

Download URL vbuild-0.8.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
270cd9078349d907dfae6c0e6364a5a5e74cb86183bb5093613f12a18b435fa9
BLAKE2b-256 checksum
How to use checksums
22bef0c6204a36440bbcc086bfa25964d009b7391c5a3c74d6e73188efd47adb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.2 Linux/5.15.0-1041-azure

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

Download URL vbuild-0.8.2-py2.py3-none-any.whl
Size 9.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d76bcc976a1c53b6a5776ac947606f9e7786c25df33a587ebe33ed09dd8a1076
BLAKE2b-256 checksum
How to use checksums
a63d7b22abbdb059d551507275a2815bc2b1974e3b9f6a13781c1eac9e858965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.2 Linux/5.15.0-1041-azure

Release history Release notifications | RSS feed

This release

0.8.2 This release

2 release files

0.8.1

2 release files

0.8.0

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