Skip to main content

JMP

JMP (Just More Python) is a small Python utility library with simple functions for common tasks and CLI output.

Installation

Install JMP from PyPI:

pip install just-more-python

Usage

Import JMP with:

import jmp

Output functions

JMP provides several colored output functions:

jmp.error("Something went wrong")
jmp.warn("Be careful")
jmp.info("Here is some information")
jmp.success("Everything worked")

error() and warn() support custom headings:

jmp.error("File not found", heading="Oops:")
jmp.warn("This might cause problems", heading="Notice:")

You can also remove the heading entirely:

jmp.error("Something went wrong", heading=None)

pwd()

Get the current working directory:

directory = jmp.pwd()

By default, pwd() prints the directory and returns it.

To only return the directory without printing:

directory = jmp.pwd(text=False)

fatal()

Print a fatal error and exit the program:

jmp.fatal("Could not continue")

By default, fatal() exits with status code 1. A custom exit code can be provided:

jmp.fatal("Invalid configuration", code=2)

success()

Print a successful message and return an exit status of 0 by default:

code = jmp.success("Operation completed")

A different return code can be provided if needed:

code = jmp.success("Operation completed", code=5)

Functions

Function Description
error() Prints a red error message
warn() Prints a yellow warning message
info() Prints a blue information message
success() Prints a green success message and returns a code
fatal() Prints a fatal message and exits
pwd() Gets the current working directory

Requirements

JMP currently uses Colorama for colored terminal output.

Colorama is installed automatically when JMP is installed through pip.

Release files for just-more-python 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for just-more-python 1.0.2
File Size Uploaded
just_more_python-1.0.2.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for just-more-python 1.0.2
File Interpreter ABI Platform
just_more_python-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / just_more_python-1.0.2.tar.gz

Download URL just_more_python-1.0.2.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2bf75975de5576904d889d29119f8224cceafd85f33b460c3d13c1ac64c5e7ce
BLAKE2b-256 checksum
How to use checksums
e938445b2826800f098553f52a60ce8aa12b5af36a5d7cc99b35feb1178ac5d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / just_more_python-1.0.2-py3-none-any.whl

Download URL just_more_python-1.0.2-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
329c754163a9486edaf9037eb9485a2b2c959844d0e5448ea8f3136a12397116
BLAKE2b-256 checksum
How to use checksums
e03923a6798cd8c805cc9725e3e99caa0344b22312c0f41ebc98b0fc73f0ff25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page