Skip to main content

A fancy text and logging tool for console applications

Project description

consoleTools

A python module made for server applications for formatting and logging


consoleTools: v0.2.1 (stableish - no update since 0.2.0, just a repackage)

Packaged: Yes

OS Support: OS Independant


What am I?

We needed a logging tool and console display tool with a fancy output with colours, so we quickly whipped this together.

Other features will be implemented to this over-time as we need more things in our console apps (main feature is logging).

All logs are stored in logs/date-log.txt


Defaults can be changed in install-location/consoleTools/core.py with some basic python knowledge.


Usage

#Logging and displaying console output
from consoleTools import consoleDisplay as cd
cd.log('e','I am an error')
cd.log('w','I am a warning')
cd.log('i','I am an informational message')
cd.log('n',"I am a notice and therefore have no formatting as I'm not that important")
cd.log('s','Woo-hoo! Your thing worked')

Other non-major items:

  • cd.clear() - clear console
  • cd.printFile() - print file contents

Questions people asked when making this (but not in their words)

q) I don't want to log to a file

a) There is a no logging flag that defaults to false, specify it as true to disable logging to a file:

cd.log('s','I will not log to a file',True)

Add the boolean flag True and nothing will be logged to a file

q) I don't want to log to logs/. Why are you making me do this

a) By adding the simple flag file="x" you can log to wherever you want there

cd.log('s','I will log to a custom file',file="thisfilecontainsthe.log")

q) I know what happened, but when?

a) The log files contain dates and times - we try and keep the console nice and clean


Getting Console Tools

Stable

Console tools is easy to install via pip:

pip install Console-Tools

Nightly

Grab this version (may not function at all/function correctly)

git clone https://github.com/dudeisbrendan03/consoleTools.git

pip install -r requirements.txt

(Optional) - Access the module globally:

Move the consoleTools folder to Python37\Lib\site-packages

Beta

We upload a beta (partially stable) version to PyPI test.

python -m pip install --index-url https://test.pypi.org/simple/ Console-Tools

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

Console Tools-0.2.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

Console_Tools-0.2.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file Console Tools-0.2.1.tar.gz.

File metadata

  • Download URL: Console Tools-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for Console Tools-0.2.1.tar.gz
Algorithm Hash digest
SHA256 954469036e3c9d57ff15a13512ca7f412ceda57856b6cbfb59402405ab77c85a
MD5 8c9b967842c7abac11fa258614c16cbf
BLAKE2b-256 5780f8dc179c1d723d4c5ce536e293dcefd5c23294d72c2c2c4dcef2faf7e352

See more details on using hashes here.

File details

Details for the file Console_Tools-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: Console_Tools-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for Console_Tools-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be6c6eb0daa5d9c6c46e815a6b8749e43ec1f3029cf8af383a1558c512722be8
MD5 8501bf12abb0c184332bbbc59b33db17
BLAKE2b-256 1effa29a968180fee39a18ca4988600deffc197354f31c2eedb79771438eb3f4

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