Python implementation of the RapidPro expression and templating system
Project description
RapidPro Expressions
====================
Python implementation of the RapidPro expression and templating system
Usage
-----
```python
context = new EvaluationContext()
context.put_variable("name", "bob jones")
TemplateEvaluator evaluator = TemplateEvaluator()
output, errors = evaluator.evaluate_template("Hi @(PROPER(name))", context, False)
assert output == "Hi Bob Jones"
assert len(errors) == 0
```
====================
Python implementation of the RapidPro expression and templating system
Usage
-----
```python
context = new EvaluationContext()
context.put_variable("name", "bob jones")
TemplateEvaluator evaluator = TemplateEvaluator()
output, errors = evaluator.evaluate_template("Hi @(PROPER(name))", context, False)
assert output == "Hi Bob Jones"
assert len(errors) == 0
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rapidpro-expressions-1.0.1.tar.gz
(70.4 kB
view hashes)
Built Distribution
Close
Hashes for rapidpro-expressions-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 815cbd3e3d03210253b01024e49f4b47c3464c39d41b44ce1a8be3b95489552b |
|
MD5 | c763502c07d2d674e1c9e7a8c1902092 |
|
BLAKE2b-256 | 71a1d0f4a5c565560fb28ae6cb70fb6a126bd1b64de40420f569c64a8d747f64 |
Close
Hashes for rapidpro_expressions-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 990396bd64ef0896afc092167293e067e96249ca747856438e70a243ca892419 |
|
MD5 | 02076861e487dd1312599b5825c2d463 |
|
BLAKE2b-256 | 1a46d0632cda0ca3c13043ef4dec93e1fe2b79638d0f8ad54408f32224521926 |