Skip to main content

colorboy

Easily add color to your strings

Installation

pip install colorboy

Usage

import colorboy as cb
print(cb.cyan('Globgogabgalab'))

# import specific colors, bg_colors and styles
from colorboy import white_bg, black
print(white_bg(black('Pog')))

# import everything
from colorboy import *
print(green('Mayonnaise'))

from colorboy.colors import * # import all colors
print(red('EDEN'))
from colorboy.bg_colors import * # import all bg_colors
print(black_bg('Stephen'))
from colorboy.styles import * # import all styles
print(bright('Crywolf'))

Colors

These are all the color functions available through colorboy:

# colors - available by importing colorboy or colorboy.colors
black
red
green
yellow
blue
magenta
cyan
white

# bg_colors - available by importing colorboy or colorboy.bg_colors
black_bg
red_bg
green_bg
yellow_bg
blue_bg
magenta_bg
cyan_bg
white_bg

# styles - available by importing colorboy or colorboy.styles
dim
bright

Dev Instructions

Get started

  1. Install Python (Python 3.7 works, probably other versions too)
  2. Install Poetry. Poetry is used to manage dependencies, the virtual environment and publishing to PyPI, so it's worth learning
  3. Run poetry install to install Python package dependencies

I recommend running poetry config virtualenvs.in-project true, which makes Poetry store your Python virtual environment inside the project folder. Additionally, it lets VSCode's Python extension detect the virtual environment if you set the python.pythonPath setting to ${workspaceFolder}/.venv/bin/python in your settings.

Running

To test if things work, you can run the following command to open the Python REPL. Then you can write Python, such as the usage examples:

poetry run python

Releasing a new version

  1. Consider updating the lockfile by running poetry update, then check if thing still work
  2. Bump the version number:
    poetry version <version>
    
  3. Update CHANGELOG.md
  4. Build:
    poetry build
    
  5. Commit and create git tag
  6. Create GitHub release with release notes and attach the build files
  7. Publish to PyPi:
    poetry publish
    

Metadata

Release files for colorboy 1.0.3

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

Source distribution (sdist)

Source distribution for colorboy 1.0.3
File Size Uploaded
colorboy-1.0.3.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colorboy 1.0.3
File Interpreter ABI Platform
colorboy-1.0.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 6.2 kB

Release files / colorboy-1.0.3.tar.gz

Download URL colorboy-1.0.3.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7815a1876c1bc48567dfd203a39ed7bb84ef6b4dadc1a6527d285c09053bc28c
BLAKE2b-256 checksum
How to use checksums
b2671042f95c64d530398626789b358e8823b6baa10e314338bf71ca470df506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.9.1 Darwin/18.7.0

Release files / colorboy-1.0.3-py2.py3-none-any.whl

Download URL colorboy-1.0.3-py2.py3-none-any.whl
Size 3.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
085e6a2b1e1672baf576baa4db3f0b723947fdc2928a467fc5185cc25416903d
BLAKE2b-256 checksum
How to use checksums
c4b37468650d4d6c39937ef14246d98926daae19ffe76c9e8cc1c309258a9612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.9.1 Darwin/18.7.0

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

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