semvec/pypi-packages huggingface dataset:
odata-pretty-printer 0.1.1
Pretty printer for OData filter expressions
License: MIT

## odata-pretty-printer

Pretty printer for OData filter expressions. 

This is an example of using [oppen-pretty-print] to create a pretty-printer for 
OData filter expressions.

This is not a robust program, just a bench tool that's used occasionally to pretty-print
complex OData filters that would otherwise be unreadable. The input filter is expected to be 
grammatically correct, just untidy. Pretty error reporting is non-existent!

### Usage

	pip install odata-pretty-printer

    odata-printer  "ShowOnSite eq true and PublicationDate le 2020-04-29T08:49:33Z \
                    and PublicationDate ge 2019-04-29T08:49:33Z and ChannelId eq 23 \
                    and (ExpiryDate eq null or ExpiryDate ge 2020-04-29T08:49:33Z) and \
                    IsAdvisor eq true and (FundCodeList/any(fundcode: fundcode eq 'ITSMT') \
                    or SectorCodeList/any(sectorcode: sectorcode eq 'T:IG') \
                    or GroupCodeList/any(groupcode: groupcode eq 'BAIL'))"

    odata-printer -f tmp/filter_example.txt  

Output:
```
ShowOnSite eq true
  and PublicationDate le 2020-04-29T08:49:33Z
  and PublicationDate ge 2019-04-29T08:49:33Z
  and ChannelId eq 23
  and (ExpiryDate eq null or ExpiryDate ge 2020-04-29T08:49:33Z)
  and IsAdvisor eq true
  and (FundCodeList/any(fundcode: fundcode eq 'ITSMT')
        or SectorCodeList/any(sectorcode: sectorcode eq 'T:IG')
        or GroupCodeList/any(groupcode: groupcode eq 'BAIL'))
```
	
## Documentation

Head over to the [*README*][homepage] for more details.

## Contributing

The source code for *odata-pretty-printer* is available
[on GitHub][repo]. If you find a bug or something is unclear, we encourage
you to raise an issue. We also welcome contributions, to contribute, fork the
repository and open a [pull request][pulls].

[repo]: https://github.com/stevej2608/odata-pretty-printer
[homepage]: https://github.com/stevej2608/odata-pretty-printer/blob/master/README.md
[pulls]: https://github.com/stevej2608/odata-pretty-printer/pulls
[oppen-pretty-print]: https://github.com/stevej2608/oppen-pretty-printer/blob/master/README.md
xo1 0.2.0
EAF-based framework for creating terminal applications
License: MIT
Requires Python: >=3.7,<4.0
Keywords: curses,terminal,application,framework

|PyPI| |Build Status| |codecov.io|

===
xo1
===

Python framework for creating terminal applications.

Requirements
============

* >=python-3.7
* >=eaf-0.2

Installation
============

.. code-block:: console

	$ pip install xo1


Development
===========

Installation
------------

.. code-block:: console

   $ poetry install

Testing
-------

.. code-block:: console

   $ poetry run pytest -s -v tests/  # run all tests
   $ poetry run pytest --cov=xo1 -s -v tests/  # run all tests with coverage
   $ poetry run black xo1/ tests/  # autoformat code
   $ # run type checking
   $ poetry run pytest --mypy --mypy-ignore-missing-imports -s -v xo1/ tests/
   $ # run code linting
   $ poetry run pytest --pylint -s -v xo1/ tests/

Documentation
-------------

* **To be added**

.. |PyPI| image:: https://badge.fury.io/py/xo1.svg
   :target: https://badge.fury.io/py/xo1
.. |Build Status| image:: https://github.com/pkulev/xo1/workflows/CI/badge.svg
.. |codecov.io| image:: http://codecov.io/github/pkulev/xo1/coverage.svg?branch=master
   :target: http://codecov.io/github/pkulev/xo1?branch=master
oppen-pretty-printer 0.1.2
pretty-printing algorithm developed by DEREK C. OPPEN
License: MIT

## oppen-pretty-printer

This package is a faithful translation, to python, of the 
pretty-printing algorithm developed by DEREK C. OPPEN at Stanford  University 
in the late 1970s. The appendix of [PRETTY PRINTING, Derek C. Oppen, 1979] contains 
the original prettyprint program written in [MESA]

A much quoted, more recent algorithm, [A prettier printer, Philip Wadler 2003] refers to 
Oppen, saying, "The pretty printer presented here uses an algorithm equivalent to Oppenâ€™s, but presented 
in a functional rather than an imperative style". Many of todays pretty printer implementations
are based on the Wadler algorithm. So, in a way, the road leads back to Derek C. Oppen, 1979.

Two python versions are included. `pretty_oppen.py` is, as far as possible, a 
line-by-line translation of the Oppen algorithm from [MESA] to Python. `pretty.py` is
functionally identical to `pretty_oppen.py` but written using a more Pythonic idiom.

Pytest tests and example output are included for both versions.


### Usage

	pip install oppen-pretty-printer
	
Example:
```
from oppen_pretty_printer import pprint, Token as T

tokens = [
    T.BEGIN(),
    T.STRING("begin"),
    T.STRING("x"),
    T.BREAK(), T.STRING(":="), T.BREAK(),
    T.STRING("40"),
    T.BREAK(), T.STRING("+"), T.BREAK(),
    T.STRING("2"),
    T.STRING("end"),
    T.END(),
    T.EOF()]

pprint(tokens)
```
	
## Documentation

Head over to the [*README*][docs-homepage] for more details.

## Contributing

The source code for *oppen-pretty-printer* is available
[on GitHub][opp-repo]. If you find a bug or something is unclear, we encourage
you to raise an issue. We also welcome contributions, to contribute, fork the
repository and open a [pull request][opp-pulls].

[opp-repo]: https://github.com/stevej2608/oppen-pretty-printer
[docs-homepage]: https://github.com/stevej2608/oppen-pretty-printer/blob/master/README.md
[opp-pulls]: https://github.com/stevej2608/oppen-pretty-printer/pulls
[PRETTY PRINTING, Derek C. Oppen, 1979]: https://www.cs.tufts.edu/~nr/cs257/archive/derek-oppen/prettyprinting.pdf
[A prettier printer, Philip Wadler 2003]: http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf
[MESA]: http://www.bitsavers.org/pdf/xerox/parc/techReports/CSL-79-3_Mesa_Language_Manual_Version_5.0.pdf