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

@thejohnfreeman/generator-python

v0.2.5

Published

A Python 3 package with docs, lint, tests, and CI.

Downloads

4

Readme

generator-python

A Yeoman generator for a Python 3 package with docs, lint, tests, and continuous integration.

npm code style: Prettier

Preview

Take a look at the sample project built with this generator. It is tested on Travis CI and published on PyPI with documentation on Read the Docs.

Install

This generator assumes you are using Poetry for managing Python packages. It will use whatever Python version is activated in your environment. I recommend using pyenv to manage different versions of Python.

# Required
$ curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
$ yarn global add yo @thejohnfreeman/generator-python
# Optional
$ curl https://pyenv.run | bash

Use

From within your project directory:

$ pyenv local 3.6-dev
$ yo @thejohnfreeman/python

Options

Although there are some parameters to this generator, such as the package name and author, there are no optional pieces. Instead, I recommend you include every generated file in your first commit, then delete the files you don't want in your second commit, and go from there. That way, if you ever change your mind later, you can resurrect the file that was generated for you, not by re-running the generator and potentially overwriting other files, but by asking Git for the version you deleted:

$ git checkout $(git rev-list -1 HEAD -- "$file")^ -- "$file"

| Option | Type | Description | | ------ | ---- | ----------- | | project_name | string | The project name. The project namespace is distinct from the package namespace. Think GitHub and Read the Docs, where your project coexists with projects from other language ecosystems. Default is the name of the current directory. | | package_or_module | "package""module" | Whether this will be a package (directory) or module (single file). | | package_name | string | The package (or module) name, i.e. the name your users will import.This will be the name of your PyPI package, too, but if that name is already taken, you will need to change it in pyproject.toml and README.rst. Default is the project name sanitized to a Python identifier. | | version | string | The first version string. Default is 0.1.0. | | author | string | The author name. Default comes from your Git configuration. This generator assumes a single author. If you need to add more, add them after the generator finishes. | | email | string | The author email. Default comes from your Git configuration. | | repository | string | The repository URL. Default is the project name within your namespace on github.com. | | python | "3.6‑dev""3.7‑dev""3.8‑dev" | The minimum supported version of Python. Default is 3.6-dev. |

Why not Cookiecutter?

I explain my reasons on my blog.