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.
License
License information will be added here.
Release files for just-more-python 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| just_more_python-1.0.1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| just_more_python-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / just_more_python-1.0.1.tar.gz
| Download URL | just_more_python-1.0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d675fb365d3687c50ff1f5f05d96e7d18e82d2957e49be83446b037b34ba80b
|
|
BLAKE2b-256 checksum How to use checksums |
5d34d38990c6160a89e7eb8760020ca3502a4bb8e1e09a7cb473da631194bee7
|
| 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.1-py3-none-any.whl
| Download URL | just_more_python-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed09796324661fc0605475676d4f10cd8f39036003b24c79afcacba4ee629034
|
|
BLAKE2b-256 checksum How to use checksums |
4af96401487c032c33011e5e9eb5b419c53acf712d293db29fd6ed41e23291b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|