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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sarafu

v0.0.0

Published

The Sarafu Project

Readme

Sarafu

Below you will find basic setup and deployment instructions for the sarafu project. To begin you should have the following applications installed on your local development system:

  • Python >= 3.5
  • NodeJS >= 4.2
  • pip <http://www.pip-installer.org/>_ >= 1.5
  • virtualenv <http://www.virtualenv.org/>_ >= 1.10
  • virtualenvwrapper <http://pypi.python.org/pypi/virtualenvwrapper>_ >= 3.0
  • Postgres >= 9.3
  • git >= 1.7

A note on NodeJS 4.2 for Ubuntu users: this LTS release may not be available through the Ubuntu repository, but you can configure a PPA from which it may be installed::

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

You may also follow the manual instructions if you wish to configure the PPA yourself:

https://github.com/nodesource/distributions#manual-installation

Django version

The Django version configured in this template is conservative. If you want to use a newer version, edit requirements/base.txt.

Getting Started

First clone the repository from Github and switch to the new directory::

$ git clone [email protected]:[ORGANIZATION]/sarafu.git
$ cd sarafu

To setup your local environment you can use the quickstart make target setup, which will install both Python and Javascript dependencies (via pip and npm) into a virtualenv named "sarafu", configure a local django settings file, and create a database via Postgres named "sarafu" with all migrations run::

$ make setup
$ workon sarafu

If you require a non-standard setup, you can walk through the manual setup steps below making adjustments as necessary to your needs.

To setup your local environment you should create a virtualenv and install the necessary requirements::

# Check that you have python3.5 installed
$ which python3.5
$ mkvirtualenv sarafu -p `which python3.5`
(sarafu)$ pip install -r requirements/dev.txt
(sarafu)$ npm install

Next, we'll set up our local environment variables. We use django-dotenv <https://github.com/jpadilla/django-dotenv>_ to help with this. It reads environment variables located in a file name .env in the top level directory of the project. The only variable we need to start is DJANGO_SETTINGS_MODULE::

(sarafu)$ cp sarafu/settings/local.example.py sarafu/settings/local.py
(sarafu)$ echo "DJANGO_SETTINGS_MODULE=sarafu.settings.local" > .env

Create the Postgres database and run the initial migrate::

(sarafu)$ createdb -E UTF-8 sarafu
(sarafu)$ python manage.py migrate

If you want to use Travis <http://travis-ci.org>_ to test your project, rename project.travis.yml to .travis.yml, overwriting the .travis.yml that currently exists. (That one is for testing the template itself.)::

(sarafu)$ mv project.travis.yml .travis.yml

Development

You should be able to run the development server via the configured dev script::

(sarafu)$ npm run dev

Or, on a custom port and address::

(sarafu)$ npm run dev -- --address=0.0.0.0 --port=8020

Any changes made to Python, Javascript or Less files will be detected and rebuilt transparently as long as the development server is running.

Deployment

The deployment of requires Fabric but Fabric does not yet support Python 3. You must either create a new virtualenv for the deployment::

# Create a new virtualenv for the deployment
$ mkvirtualenv sarafu-deploy -p `which python2.7`
(sarafu-deploy)$ pip install -r requirements/deploy.txt

or install the deploy requirements globally::

$ sudo pip install -r requirements/deploy.txt

You can deploy changes to a particular environment with the deploy command::

$ fab staging deploy

New requirements or migrations are detected by parsing the VCS changes and will be installed/run automatically.