Skip to content

Commit dd3c1ca

Browse files
author
Alan Christie
committed
Doc tweak
1 parent 8c37507 commit dd3c1ca

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ Informatics Matters Data Manager Job Decoder
55
:target: https://badge.fury.io/py/im-data-manager-job-decoder
66
:alt: PyPI package (latest)
77

8+
A package that simplifies the decoding of encoded text strings.
9+
Given an encoded string the ``decode()`` method
10+
returns the decoded value or an error.
11+
12+
For example, given the following `jinja2`_ encoded string
13+
``'{{ foo }}, bar={{ bar }}, baz={{ baz }}'`` and variable map
14+
``{'foo': 1, 'bar': 2, 'baz': 3}`` the decoder returns
15+
the string ``'foo=1, bar=2, baz=3'``.
16+
17+
The following encoding/decoding formats are supported: -
18+
19+
- jinja2 (3.0)
20+
21+
.. _jinja2: https://jinja.palletsprojects.com/en/3.0.x/
22+
823
Installation (Python)
924
=====================
1025

@@ -16,7 +31,7 @@ there::
1631
Once installed you can access the protocol buffers with:
1732

1833
>>> from decoder import decoder
19-
>>> decoder.decode(text, variables, 'command', decoder.TextEncoding.JINJA2_3_0)
34+
>>> decoded, success = decoder.decode(text, variables, 'command', decoder.TextEncoding.JINJA2_3_0)
2035

2136
.. _PyPI: https://pypi.org/project/im-data-manager-job-decoder
2237

0 commit comments

Comments
 (0)