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

generator-flask-app

v0.1.2

Published

Yeoman generator

Downloads

10

Readme

generator-flask-app

Yeoman Generator for modern web applications using flask.

Features

Installing

To install flask-app generator, run:

$ npm install -g generator-flask-app

Usage

Creating your app is as easy as:

$ yo flask-app

Just make sure you are already inside the directory for your new application. Just follow the questions and you'll have an application running in a moment;

Running My App

Before starting, make sure you have:

  • A VirtualEnv (or similar) set-up for the new environment;
  • A ruby environment with an interpreter version compatible with Sass/Compass;
  • Node.js correctly installed.

To setup all the dependencies for your project, run make setup.

After all the dependencies have been installed, you should be able to run your application with make run. Your application will be running in port 3000.

If you selected oauth application, make sure you use the host http://local.generator.com:3000/ or change the authorization providers to your own application.

If you have selected sqlalchemy support, you probable need to create the database before running with make db.

Running tests

To run your application tests, just run make test.

Application usage

General commands

  • "make list" to list all available targets;
  • "make setup" to install all dependencies (do not forget to create a virtualenv first);
  • "make test" to test your application (tests in the tests/ directory);

Redis commands

  • "make redis" to get a redis instance up (localhost:4444);
  • "make kill-redis" to kill this redis instance (localhost:4444);
  • "make redis-test" to get a redis instance up for your unit tests (localhost:4448);
  • "make kill-redis-test" to kill the test redis instance (localhost:4448);
  • "make tox" to run tests against all supported python versions.

Using Flask Admin

  • Just access http://local.generator.com:3000/admin/;
  • In order to access the admin you must change your local.conf file to change the AUTHORIZED_ADMINS configuration to include the e-mail you are logging with;

SQL Alchemy commands

  • "make migration DESC=""" to create a new database migration;
  • "make auto_migration DESC=""" to create a new database migration automatically from changes in the model;
  • "make db" to create the database and run migrations;
  • "make data" to run migrations; IMPORTANT: Do not forget to update configuration (local.conf and other environments) with your MySQL (or other database) connection string;

PyRes commands

  • "make worker" to run a PyRes Worker;
  • "make resweb" to run a web dashboard for PyRes (available at http://127.0.0.1:3001 - user: admin, pass: 123);

In order to use pyres, you must specify the queues to listen on. This can be done by setting the DEFAULT_QUEUES configuration or by running workers with "-q queue1,queue2";

IMPORTANT: Do not forget to update configuration (local.conf and other environments) with your redis connection string and change the resweb user and password;

Contributing

Please fork, update what you need and pull request.