semvec/pypi-packages huggingface dataset:
pip-services3-expressions 3.3.6
Basic portable abstractions for Pip.Services in Python
License: MIT

# <img src="https://uploads-ssl.webflow.com/5ea5d3315186cf5ec60c3ee4/5edf1c94ce4c859f2b188094_logo.svg" alt="Pip.Services Logo" width="200"> <br/> Tokenizers, parsers and expression calculators in Python

This module is a part of the [Pip.Services](http://pip.services.org) polyglot microservices toolkit.
It provides syntax and lexical analyzers and expression calculator optimized for repeated calculations.

The module contains the following packages:
- **Calculator** - Expression calculator
- **CSV** - CSV tokenizer
- **IO** - input/output utility classes to support lexical analysis
- **Mustache** - Mustache templating engine
- **Tokenizers** - lexical analyzers to break incoming character streams into tokens
- **Variants** - dynamic objects that can hold any values and operators for them

<a name="links"></a> Quick links:

* [API Reference](https://pip-services3-python.github.io/pip-services3-expressions-python/)
* [Change Log](CHANGELOG.md)
* [Get Help](http://docs.pipservices.org/get_help/)
* [Contribute](http://docs.pipservices.org/contribute/)

## Use

Install the Python package as
```bash
pip install pip-services3-expressions
```

The example below shows how to use expression calculator to dynamically
calculate user-defined expressions.

```python
from pip_services3_expressions.variants.Variant import Variant
from pip_services3_expressions.calculator.variables.Variable import Variable
from pip_services3_expressions.calculator.ExpressionCalculator import ExpressionCalculator
from pip_services3_expressions.calculator.variables.VariableCollection import VariableCollection

# ...

clalculator = ExpressionCalculator()

clalculator.expression = "A + b / (3 - Max(-123, 1)*2)"
vars = VariableCollection()
vars.add(Variable("A", Variant(1)))
vars.add(Variable("B", Variant(3)))

result = clalculator.evaluate_with_variables(vars)
print('The result of the expression is ' + result.as_string)
# ...
```

This is an example to process mustache templates.
```python
mustache = MustacheTemplate()
mustache.template = "Hello, {{{NAME}}}{{#ESCLAMATION}}!{{/ESCLAMATION}}{{#unless ESCLAMATION}}.{{/unless}}"
result = mustache.evaluate_with_variables({ 'NAME': 'Mike', 'ESCLAMATION': True }) 
print("The result of template evaluation is '" + result + "'")
```

## Develop

For development you shall install the following prerequisites:
* Python 3.7+
* Visual Studio Code or another IDE of your choice
* Docker

Install dependencies:
```bash
pip install -r requirements.txt
```

Run automated tests:
```bash
python test.py
```

Generate API documentation:
```bash
./docgen.ps1
```

Before committing changes run dockerized build and test as:
```bash
./build.ps1
./test.ps1
./clear.ps1
```

## Contacts

The module is created and maintained by:
- **Sergey Seroukhov**
- **Danil Prisiazhnyi**
pip-services3-commons 3.3.14
Basic portable abstractions for Pip.Services in Python
License: MIT

Pip.Services Commons
--------------------

Pip.Services is an open-source library of basic microservices.
pip_services3_commons package provides basic abstractions portable across variety of languages.

Links
`````

* `website <http://github.com/pip-services/pip-services>`
* `development version <http://github.com/pip-services-python/pip-services-commons-python>`
tk-builder 1.1.12
This provides a set tools for simple creation of graphical user interfaces for Python based on the tkinter library. The main focus for the GUIs is assumed to be on overhead imaging applications.
License: MIT

Tk_Builder
==========
The goal encouraging this project was to introduce the capability for fast and simple prototyping 
to enable research. The decision was made to use [tkinter](https://docs.python.org/3/library/tkinter.html)
for this capability. The particulars of this choice are entirely pragmatic. Most
importantly, `tkinter` is well supported for essentially every architecture that
Python is supported, and there are no complicating factors in licensing, configuration,
or installation. 

For better or for worse, `tkinter` will work on essentially any government system with a viable 
Python environment right out of the box. The same cannot generally be said for the other popular 
GUI frameworks like QT, WX, or GTK. This provides a set tools for simple creation of graphical 
user interfaces for Python based on the tkinter library. The main focus for the GUIs is assumed 
to be on overhead imaging applications.

The `ImagePanel` and `ImageCanvas` classes contain functionality to save figures to numpy arrays
and to disk.  For many user facing applications this would be accomplished by using the `save canvas`
button provided in an `ImagePanel`.  This features saved all image and vector data displayed within
an image panel.  If a user wishes to save figures this way, then it will be saved as a `postscript` 
or `.ps` file, which will probably be sort of useless without the `ghostscript` application.

Origins
-------
This was developed to enable simple prototyping of graphical user interfaces useful in conjunction 
with SarPy project, and was developed at the National Geospatial-Intelligence Agency (NGA). 
The software use, modification, and distribution rights are stipulated within the MIT license.

Dependencies
------------
The core library functionality depends only on `tkinter`, `numpy`, `pillow`,
`matplotlib`, `scipy`, and minor dependence on `sarpy`, all of which can be 
installed using conda or pip. Note that `tkinter` is part of the standard distribution 
on some platforms, and has to be installed separately on others.

Installation
------------
From PyPI, install using pip (may require escalated privileges e.g. sudo):
```bash
pip install tk_builder
```
Note that here `pip` represents the pip utility for the desired Python environment.

From the top level of a cloned version of this repository, install for all users of 
your environment (may require escalated privileges, e.g. sudo):
```bash
python setup.py install
```
Again, `python` here represents the executible associated with the desired Python 
environment.

For more verbose instructions for installing from source, such as how to perform an 
install applicable for your user only and requiring no escalated privileges, 
see [here](https://docs.python.org/3/install/index.html).