Skip to main content

Easily add color to your strings

Project description

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
    

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

colorboy-1.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

colorboy-1.0.3-py2.py3-none-any.whl (3.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file colorboy-1.0.3.tar.gz.

File metadata

  • Download URL: colorboy-1.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.9.1 Darwin/18.7.0

File hashes

Hashes for colorboy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7815a1876c1bc48567dfd203a39ed7bb84ef6b4dadc1a6527d285c09053bc28c
MD5 b6773cfb0fe0e5f7787c92324cee1941
BLAKE2b-256 b2671042f95c64d530398626789b358e8823b6baa10e314338bf71ca470df506

See more details on using hashes here.

File details

Details for the file colorboy-1.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: colorboy-1.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.9.1 Darwin/18.7.0

File hashes

Hashes for colorboy-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 085e6a2b1e1672baf576baa4db3f0b723947fdc2928a467fc5185cc25416903d
MD5 89f5cfef3caab731a2f264d8e924163b
BLAKE2b-256 c4b37468650d4d6c39937ef14246d98926daae19ffe76c9e8cc1c309258a9612

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