npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

python-revue

v0.2.0

Published

Python framework for building ML & data science web apps.

Downloads

25

Readme

revue - Python Vue Binding

revue 期望提供一个前端 Vue 后端 Flask,快速开发标注工具 / 可视化页面的最佳实践,它可以帮助你

  1. 生成一个静态页面托管在 oss 上
  2. 生成一个标注工具,把比较重的任务放在后端计算

Usage

启动服务

cd examples/boilerplate
python3 app.py

开发前必读

  1. vue 组件默认放在 python 文件同级的 components 目录下,可以通过 Vue 类的 component_folder 参数控制
    1. revue 使用前端编译,一般情况下开发时无需安装 npm 环境
    2. 编写好的前端组件可以通过命令行工具 revue build / revue publish PACKAGE VERSION 预先编译好,并传到 oss 上,加快页面加载速度,但编译时需要安装 npm + webpack 环境
  2. revue 提供生成静态页面托管在 pages 服务上,和自己启动 web 服务两种模式
    1. 静态页面的数据可以通过 app.data 传入,参考:模板项目
    2. 启动服务时可以使用 @app.method 定义供前端使用的回调函数,参考:模板项目
      • @app.method 定义的回调函数仅对启动服务生效,静态页面会忽略这些回调
    3. 可以通过 @app.data 定义懒加载的数据,参考:模板项目
  3. 通过 app.use 可以使用用户自定义的 Vue 组件,传入的参数可以是字符串,或一个生成字符串的函数
    • 字符串是一些 html 标签,这些标签会被放在 index.html 的头部(head 标签里),但通过传入 prepend=True 可以使它拼在文件末尾
    • 例如:app.use('<script src="https://unpkg.com/viser-vue/umd/viser-vue.min.js"></script>', prepend=True)