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

@caleb-ne1/pyrun

v1.1.0

Published

CLI tool to initialize and run Python projects

Readme

PyRun

PyRun simplifies Python project setup, dependency management and development server execution with automatic virtual environment handling and reload behavior.


Why PyRun?

PyRun provides:

  • One-command project initialization
  • Automatic virtual environment creation
  • Structured dependency tracking via modules.json
  • Smart install, upgrade, and downgrade handling
  • Bulk dependency installation (--all)
  • Clean uninstall support
  • Framework-aware run commands
  • Host and port override support
  • Automatic server refresh on dependency changes
  • Optional reload with custom directories for development
  • Run arbitrary Python modules with extra CLI arguments

It brings a familiar, clean CLI experience to Python development.


Installation

Install globally via npm:

npm install -g @caleb-ne1/pyrun

Verify installation:

pyrun --help

Quick Start

1. Initialize a Project

pyrun init <framework> [path]

Example:

pyrun init fastapi .

This will:

  • Create a venv virtual environment
  • Generate modules.json
  • Install required framework dependencies

2. Run the Project

pyrun run [entry-file] --port <port> --host <host>

Examples:

pyrun run
pyrun run app.py
pyrun run app.py --port 3000
pyrun run app.py --host 0.0.0.0 --port 8000
pyrun run app.py --reload
pyrun run app.py --reload --reloadDirs src,api

PyRun automatically detects:

  • app.py
  • main.py
  • manage.py

Frameworks with native reload support use their internal reload mechanisms for efficient development.

Reload behavior:

  • Optional --reload enables automatic server restart on code changes

  • --reloadDirs allows specifying directories to watch for changes (defaults to project root if not provided)

  • Supported frameworks: Flask and FastAPI


3. Run Python Modules

You can run Python modules like pyinstaller, pytest, black, etc., directly:

pyrun run <project> --module pyinstaller --extraArgs="--onefile --noconsole app.py"
pyrun run <project> --module pytest --extraArgs="tests/"
  • --module specifies the Python module

  • --extraArgs passes additional CLI arguments to the module


4. Install Dependencies

Install one or multiple modules:

pyrun install requests
pyrun install flask:2.0.1
pyrun install requests fastapi:0.110.0

Behavior:

  • Installs new modules
  • Updates versions if different
  • Downgrades when specified
  • Updates modules.json
  • Triggers server refresh when running

5. Install All Project Dependencies

After cloning a project:

pyrun install --all

This installs all dependencies defined in modules.json.


6. Uninstall Modules

pyrun uninstall requests
  • Removes the module from the virtual environment
  • Updates modules.json
  • Refreshes the server if running

Project Structure

After initialization:

myproject/
├── venv/
├── modules.json
├── app.py | main.py | manage.py

modules.json Example

{
  "framework": "fastapi",
  "dependencies": {
    "fastapi": "0.110.0",
    "uvicorn": "0.29.0",
    "requests": "2.31.0"
  }
}

modules.json replaces traditional requirements.txt with structured dependency tracking.


Supported Frameworks

  • Django
  • Flask
  • FastAPI
  • Plain Python

License

This project is licensed under the MIT License. See the LICENSE file for details.