Skip to main content
=====
nider
=====

.. image:: https://img.shields.io/travis/pythad/nider.svg
:target: https://travis-ci.org/pythad/nider
:alt: Travis build

.. image:: https://img.shields.io/pypi/pyversions/nider.svg
:target: https://pypi.python.org/pypi/nider
:alt: Supported python versions

.. image:: https://img.shields.io/pypi/v/nider.svg
:target: https://pypi.python.org/pypi/nider
:alt: PyPI version

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

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

.. image:: https://img.shields.io/github/license/pythad/nider.svg
:target: https://pypi.python.org/pypi/nider
:alt: License

Python package for text images generation and watermarking


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

``nider`` is an approach to make generation of text 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.

************
Installation
************

.. code-block:: console

$ pip install nider

*******
Example
*******

Creating a simple image is as easy as

.. code-block:: python

from nider.models import Header
from nider.models import Paragraph
from nider.models import Linkback
from nider.models import Content
from nider.models import Image

header = Header('Your super interesting title!')
para = Paragraph('Lorem ipsum dolor sit amet.')
linkback = Linkback('foo.com | @username')
content = Content(para, header, linkback, padding=60)

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

img.draw_on_bg('#212121')

***************
Featured images
***************

All of the featured images were drawn using ``nider`` package. Code used to generate them can be found `here <https://github.com/pythad/nider/tree/master/examples>`_.


Example 1
=========
.. image:: https://github.com/pythad/nider/raw/master/examples/example1/result.png
:alt: example1

Example 2
=========
.. image:: https://github.com/pythad/nider/raw/master/examples/example2/result.png
:alt: example2

Example 3
=========
.. image:: https://github.com/pythad/nider/raw/master/examples/example3/result.png
:alt: example3

Example 4
=========
.. image:: https://github.com/pythad/nider/raw/master/examples/example4/result.png
:alt: example4

Watermark example 1
===================
.. image:: https://github.com/pythad/nider/raw/master/examples/add_watermark_example/result.jpg
:alt: add_watermark_example

Watermark example 2
===================
.. image:: https://github.com/pythad/nider/raw/master/examples/draw_on_bg_with_watermark_example/result.png
:alt: draw_on_bg_with_watermark_example



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

0.1.0 (2017-07-27)
------------------

* First release on PyPI.


0.2.0 (2017-08-12)
------------------

* Added ``PIL.ImageEnhance`` and ``PIL.ImageFilter`` built-in support
* Enabled auto color generation for unit colors


0.3.0 (2017-08-17)
------------------

* Dropped shadow support for units
* Added outline support for units
* Made unit's font config as a separate class


0.4.0 (2017-09-14)
------------------

* Added ability to add watermarks to images




Metadata

Release files for nider 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nider 0.5.0
File Size Uploaded
nider-0.5.0.tar.gz 57.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nider 0.5.0
File Interpreter ABI Platform
nider-0.5.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 73.7 kB

Release files / nider-0.5.0.tar.gz

Download URL nider-0.5.0.tar.gz
Size 57.0 kB
Tags Source
SHA-256 checksum
How to use checksums
51d11606dceffa51acbc35a93e0ffc0a0bd2a2408d17335a398a87fab41fa82d
BLAKE2b-256 checksum
How to use checksums
e410fed3e5120ef02199f6c6762e510f77ca8469672ac95025327182dbee50d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

Release files / nider-0.5.0-py2.py3-none-any.whl

Download URL nider-0.5.0-py2.py3-none-any.whl
Size 16.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
689f9e28fa417e8596953049571d878eac0ee63174eb47c6ff4f60511f1cd809
BLAKE2b-256 checksum
How to use checksums
8da0450ade05f26e84df91bd82c70705014c8aea43e2de28f1cd28f064f2e339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page