Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Python package to add text to images, textures and different backgrounds

Project Description
=======
zeption
=======

.. image:: https://img.shields.io/pypi/v/zeption.svg
:target: https://pypi.python.org/pypi/zeption

.. image:: https://img.shields.io/travis/pythad/zeption.svg
:target: https://travis-ci.org/pythad/zeption

.. image:: https://readthedocs.org/projects/zeption/badge/?version=latest
:target: https://zeption.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://pyup.io/repos/github/pythad/zeption/shield.svg
:target: https://pyup.io/repos/github/pythad/zeption/
:alt: Updates


Python package to add text to images, textures and different backgrounds


* Free software: MIT license
* Documentation: https://zeption.readthedocs.io.

``zeption`` is an approach to make generation of text based images simple yet flexible. Creating of an image is as simple as describing units you want to be rendered to the image and choosing a method that will be used for drawing.

********
Features
********

Drawing on a texture
====================

.. code-block:: python

from zeption.models import Content
from zeption.models import Header
from zeption.models import Linkback
from zeption.models import Paragraph
from zeption.models import TwitterPost

# TODO: change this fontpath to the fontpath on your machine
roboto = '/home/ovd/.local/share/fonts/Roboto/'

header = Header(text='Your super interesting title!',
fontfullpath=roboto + 'Roboto-Bold.ttf',
fontsize=30,
text_width=40,
align='left',
color='#ededed'
)

para = Paragraph(text='Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
fontfullpath=roboto + 'Roboto-Medium.ttf',
fontsize=29,
text_width=65,
align='left',
color='#ededed'
)

linkback = Linkback(text='foo.com | @username',
fontfullpath=roboto + 'Roboto-Bold.ttf',
fontsize=24,
color='#ededed'
)

content = Content(para, header=header, linkback=linkback, padding=60)

img = TwitterPost(content,
fullpath='result.png',
)

# TODO: change this texture path to the texture path on your machine
img.draw_on_texture('texture.png')


.. image:: https://github.com/pythad/zeption/raw/master/examples/draw_on_texture_example/result.png
:alt: Draw on texture example

Drawing on a solid color
========================

.. image:: https://github.com/pythad/zeption/raw/master/examples/draw_on_bg_example/result.png
:alt: Draw on background example
:height: 500px
:width: 500px

Drawing on an image
===================

.. image:: https://github.com/pythad/zeption/raw/master/examples/draw_on_image_example/result.png
:alt: Draw on image example


===================

Code used to generate featured images can be found `here <https://github.com/pythad/zeption/tree/master/examples>`_

=======
History
=======

0.1.0 (2017-07-26)
------------------

* First release on PyPI.
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zeption-0.1.0.tar.gz (81.7 kB) Copy SHA256 Checksum SHA256 Source Jul 26, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting