Skip to main content

Little helpers for Python developers

Project description

pybrownies

This is a small library of utilities designed to assist in the creation and maintenance of Python projects. brownie performs chores like testing, linting, building, publishing. pprintenv shows the shell environment like printenv, but prettier. whichpy locates Python packages and modules (like which locates program files).

Installation

A lean install installs just pprint, pprintenv, and whichpy:

% pip install pybrownies

To also get the brownie tool and its dependencies to help developing your project, enter

% pip install pybrownies"[dev]"

Usage

brownie

To see which brownie tasks are available, enter

% brownie --list
Subcommands:

  clean       Remove non-code from the project.
  covreport   Show the coverage report in the default browser.
  dist        Create the sdist and wheel for the project.
  lint        Runs pylint and flake8 on every Python package within this
              project.
  publish     Publishes the project on TestPyPI, or on PyPI with the --pypi
              option.
  test        Runs all unit tests, optionally with test coverage.
%

To obtain more info on what a specific task does, enter e.g.

% brownie publish -h
Usage: brownie [--core-opts] publish [--options] [other tasks here ...]

Docstring:
  Publishes the project on TestPyPI, or on PyPI with the --pypi option.

Options:
  -p, --pypi   publish on pypi.org instead of test.pypi.org
  -s, --show   show the new page in the web browser
%

pprint

Renders various text file formats to the console. with syntax highlighting. Improves the readability os tructured data such as HTML, JSON, PLIST, XML. Applies syntax highlighting to source code. Displays Markdown files with styles and colors appied.

pprintenv

Outputs the environment as a table, environment variable names in one column, their values in another. For better readability, the elements of a path list (e.g. PATH) are displayed in individual lines.

whichpy

To locate modules and packages with whichpy, enter e.g.

Modules:

% whichpy shutil
/home/you/.asdf/installs/python/3.10.10/lib/python3.10/shutil.py

Packages:

% whichpy rich
/home/you/dev/pybrownies/.venv3.10/lib/python3.10/site-packages/rich/__init__.py

Modules within packages:

% whichpy rich.console
/home/you/dev/pybrownies/.venv3.10/lib/python3.10/site-packages/rich/console.py

Credits

brownie is basically an invoke task library. The colorful output is courtesy of Rich.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybrownies-0.6.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

pybrownies-0.6.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pybrownies-0.6.0.tar.gz.

File metadata

  • Download URL: pybrownies-0.6.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for pybrownies-0.6.0.tar.gz
Algorithm Hash digest
SHA256 2fe074ebca9c0b69235a1d0f3c8c9dd86d47ec2a43c720a56de187019ff0b5fa
MD5 c461e47fe83d15b3182810a264a43434
BLAKE2b-256 a9b258af3be5f0a225eff0a89d742d0d422935bf3aeac7d49e8d5a661e08e52c

See more details on using hashes here.

File details

Details for the file pybrownies-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pybrownies-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for pybrownies-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58efd02630d857b5373f964910865639f79039b387b88a3b255856d41a20f832
MD5 94271bb6995efd9914f87fe9a22caa04
BLAKE2b-256 5955f6199a6722d44811a69216e36267a6a8abc589898d02f8ddfde78a788e9f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page