Skip to main content

A library of various tools for common python tasks

Project description

linkedin github pypi vimeo alexgbraun

Introduction

Lunchbox is a library of various tools for common python tasks.

See documentation for details.

Installation

Python

pip install lunchbox

Docker

  1. Install docker-desktop
  2. docker pull thenewflesh/lunchbox:latest

Docker For Developers

  1. Install docker-desktop
  2. Ensure docker-desktop has at least 4 GB of memory allocated to it.
  3. git clone git@github.com:theNewFlesh/lunchbox.git
  4. cd lunchbox
  5. chmod +x bin/lunchbox
  6. bin/lunchbox start

The service should take a few minutes to start up.

Run bin/lunchbox --help for more help on the command line tool.

Production CLI

Lunchbox comes with a command line interface defined in command.py.

Its usage pattern is: lunchbox COMMAND [ARGS] [-h --help]

Commands

Command Description Args
slack Posts a slack message to a given channel url, channel, message
bash-completion Prints BASH completion code to be written to a _lunchbox completion file
zsh-completion Prints ZSH completion code to be written to a _lunchbox completion file

Development CLI

bin/lunchbox is a command line interface (defined in cli.py) that works with any version of python 2.7 and above, as it has no dependencies.

Its usage pattern is: bin/lunchbox COMMAND [-a --args]=ARGS [-h --help] [--dryrun]

Commands

Command Description
build-package Build production version of repo for publishing
build-prod Publish pip package of repo to PyPi
build-publish Run production tests first then publish pip package of repo to PyPi
build-test Build test version of repo for prod testing
docker-build Build image of lunchbox
docker-build-prod Build production image of lunchbox
docker-container Display the Docker container id of lunchbox
docker-coverage Generate coverage report for lunchbox
docker-destroy Shutdown lunchbox container and destroy its image
docker-destroy-prod Shutdown lunchbox production container and destroy its image
docker-image Display the Docker image id of lunchbox
docker-prod Start lunchbox production container
docker-push Push lunchbox production image to Dockerhub
docker-remove Remove lunchbox Docker image
docker-restart Restart lunchbox container
docker-start Start lunchbox container
docker-stop Stop lunchbox container
docs Generate sphinx documentation
docs-architecture Generate architecture.svg diagram from all import statements
docs-full Generate documentation, coverage report, diagram and code
docs-metrics Generate code metrics report, plots and tables
library-add Add a given package to a given dependency group
library-graph-dev Graph dependencies in dev environment
library-graph-prod Graph dependencies in prod environment
library-install-dev Install all dependencies into dev environment
library-install-prod Install all dependencies into prod environment
library-list-dev List packages in dev environment
library-list-prod List packages in prod environment
library-lock-dev Resolve dev.lock file
library-lock-prod Resolve prod.lock file
library-remove Remove a given package from a given dependency group
library-search Search for pip packages
library-sync-dev Sync dev environment with packages listed in dev.lock
library-sync-prod Sync prod environment with packages listed in prod.lock
library-update Update dev dependencies
session-lab Run jupyter lab server
session-python Run python session with dev dependencies
state State of lunchbox
test-coverage Generate test coverage report
test-dev Run all tests
test-fast Test all code excepts tests marked with SKIP_SLOWS_TESTS decorator
test-lint Run linting and type checking
test-prod Run tests across all support python versions
version Full resolution of repo: dependencies, linting, tests, docs, etc
version-bump-major Bump pyproject major version
version-bump-minor Bump pyproject minor version
version-bump-patch Bump pyproject patch version
zsh Run ZSH session inside lunchbox container
zsh-complete Generate oh-my-zsh completions
zsh-root Run ZSH session as root inside lunchbox container

Flags

Short Long Description
-a --args Additional arguments, this can generally be ignored
-h --help Prints command help message to stdout
--dryrun Prints command that would otherwise be run to stdout

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

lunchbox-0.3.3.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

lunchbox-0.3.3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file lunchbox-0.3.3.tar.gz.

File metadata

  • Download URL: lunchbox-0.3.3.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.2.1 CPython/3.10.6

File hashes

Hashes for lunchbox-0.3.3.tar.gz
Algorithm Hash digest
SHA256 cca072c2f68ba1724f5bd7648ff22aa286050a86e933d41bcb46690f672959a4
MD5 73d2349035ac05cda29c44581509c203
BLAKE2b-256 e3b516b9b6df2e151615465c023119db58ba73bef5718498f3233b70c419af8c

See more details on using hashes here.

File details

Details for the file lunchbox-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: lunchbox-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.2.1 CPython/3.10.6

File hashes

Hashes for lunchbox-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c0da522c8273c672f0f72de2b147571996469a57fc6913ba8a9a714344f11ce4
MD5 5a718db2324581d18d5692d0d898d674
BLAKE2b-256 a7ffe32858d94894568fe37c2e74e180d5763909302dd69bc58b9e026d8a9490

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