Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Create beautiful tag clouds as images or HTML

Project description

PyTagCloud let you create simple tag clouds inspired by http://www.wordle.net/

Currently, the following output formats have been written and are working:

  • PNG images
  • HTML/CSS code

If you have ideas for other formats please let us know.

Installation

You can install PyTagCloud either via the Python Package Index (PyPI) or from source.

To install using pip:

$ pip install -U pytagcloud

To install using form source download it:

$ python setup.py install

Requirements

  1. Install pygame >= 1.9.1:

    $ apt-get install python-pygame
    
  2. Install simplejson:

    $ pip install simplejson
    

Quick start

You probably want to see some code by now, so here’s an example:

from pytagcloud import create_tag_image, make_tags
from pytagcloud.lang.counter import get_tag_counts

YOUR_TEXT = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."

tags = make_tags(get_tag_counts(YOUR_TEXT), maxsize=120)

create_tag_image(tags, 'cloud_large.png', size=(900, 600), fontname='Lobster')

More examples can be found in test.py.

Example

Demo

https://github.com/atizo/PyTagCloud/raw/master/docs/example.png

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pytagcloud-0.3.3.tar.gz (726.2 kB) Copy SHA256 hash SHA256 Source None Feb 10, 2012

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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page