Skip to main content

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 easy_install:

$ easy_install -U pytagcloud

Downloading and installing from source

Download the latest version of PyTagCloud from http://pypi.python.org/pypi/pytagcloud/

You can install it by doing the following,:

$ tar xfz pytagcloud-*.tar.gz
$ cd pytagcloud-*/
$ python setup.py build
# python setup.py install # as root

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 = "A tag cloud is a visual representation for text data, typically\
used to depict keyword metadata on websites, or to visualize free form text."

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

Contributing

Development of pytagcloud happens at Github: https://github.com/atizo/PyTagCloud

You are highly encouraged to participate in the development of pytagcloud. If you don’t like Github (for some reason) you’re welcome to send regular patches.

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

pytagcloud-0.3.5.tar.gz (754.7 kB view details)

Uploaded Source

File details

Details for the file pytagcloud-0.3.5.tar.gz.

File metadata

  • Download URL: pytagcloud-0.3.5.tar.gz
  • Upload date:
  • Size: 754.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytagcloud-0.3.5.tar.gz
Algorithm Hash digest
SHA256 4d56539f0c80ed96f0d320fa0667db3f2d0cc3d2925f84522b82f48f6c0973e9
MD5 9fdbd71662b681efce79a8070b2c75ec
BLAKE2b-256 a6368626ddead8006c0dbab0a4994737db10463b9c5f837f1fbbd2bbf5bfa27c

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