Skip to main content

Random-art avatar generation

Project description

Bvatar creates a unique 8x8 graphical representation of a string.


Install from PYPI

Install with the following pip command:

pip install bvatar

Or if you want to be able to create bitmap images, use this instead:

pip install bvatar[bitmap]

Install development version

Download from github and install the development version with these commands:

git clone
cd bvatar
pip install -e .[bitmap]


Import the bvatar class and use it like so:

from bvatar import Bvatar bvtr = Bvatar(‘text’) img = bvtr.image()‘some_file.png’, ‘PNG’)

Command-line Script

Generate a Bvatar (an 8x8 randomart avatar).


bvatar [--mirror] [--no-color] [--px-size=<int>] ([TEXT] | [--hash=<sha1_hash>])
bvatar --ascii [--mirror] [--spaced] [--no-border] ([TEXT] | [--hash=<sha1_hash>])

The first format is for generating bitmap images. By default, the image is only displayed and not stored. To save the image, pipe to a file:

bvatar > some_file.png


bvatar source text (otherwise a random bvatar is generated)


generate a horizontally mirrored bvatar
use greyscale rather than coloring the image
actual size for each pixel [default: 16]
rather than passing the text and having it SHA1ed, you can pass a hex encoded SHA1 hash explicitly
output ascii rather than generating a bitmap image
a “lighter” ascii art alternative
don’t add a border around the ascii art

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bvatar, version 1.0.a5
Filename, size File type Python version Upload date Hashes
Filename, size bvatar-1.0.a5.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page