semvec/pypi-packages huggingface dataset:
cumin-py 0.0.5
Python Binding for cumin

cumin-py
========

Python Binding for `cumin <https://github.com/cympfh/cumin>`__.

setup
-----

from PyPI
~~~~~~~~~

.. code:: bash

    pip install cumin-py

from Github
~~~~~~~~~~~

.. code:: bash

    clone this, then
    pip install .

Usage
-----

.. code:: python

    import cumin

    cumin.loads("""
    struct S { x: Int, y: Int = 0 }
    let a = S(1);
    [a, a]
    """)
    # => [{'x': 1, 'y': 0}, {'x': 1, 'y': 0}]

    cumin.load("conf.cumin")  # read ./conf.cumin
WhiteStripe 0.0.1
A wrapper for the WhiteStripe normalization R package
Requires Python: >=3.6

A wrapper for [WhiteStripe](https://github.com/muschellij2/WhiteStripe). For example,

```py
import WhiteStripe as ws
t1 = ws.read("T1w.nii.gz")
ind = ws.whitestripe(t1, "T1")['whitestripe.ind']
res = ws.whitestripe_norm(t1, ind)
ws.write(res, "T1w_ws.nii.gz")
```
aiohttp-parameter-parser 0.3
Declare and validate HTTP query and path parameters in aiohttp
Requires Python: >=3.6

# URL query string / path parameter parser and validator for `aiohttp` views

[![pypi](https://img.shields.io/pypi/v/aiohttp-parameter-parser.svg)](https://pypi.python.org/pypi/aiohttp-parameter-parser)

Declare and validate HTTP query and path parameters in `aiohttp` views. 
Receive intended types instead of default `str`. Receive single parameter or an array.  

Currently only path and URL query parameter locations are supported.

### Installation
```bash
pip install aiohttp-parameter-parser
```

### Basic usage examples
```python
from datetime import datetime
from typing import Optional

import pytz
from aiohttp import web

from aiohttp_parameter_parser import ParameterView


class ExampleView(ParameterView):
    date_format = "%d-%m-%Y"  # custom date format for date parameters
    tz = pytz.timezone("Europe/Berlin")  # custom timezone for date parameters

    async def get(self) -> web.Response:
        my_tuple_of_ints: tuple[int, ...] = self.query_parameter(
            "parameter_name_in_request",
            required=True,
            is_array=True,
            max_items=6,  # len() restriction for list
            is_int=True,
            max_value=1337,  # maximum allowed value for array items
        )
        # If provided parameter is of wrong type or missing, a default 
        # HTTP 400 response is returned to client.
        
        my_str: Optional[str] = self.path_parameter(
            "a_string_parameter_name",
            # str is a default type for parsed parameter, so no 
            # `is_string=True` flag can be used
            choices=["foo", "bar", "baz"],  # enum
        )

        my_datetime: Optional[datetime] = self.query_parameter(
            "my_datetime_parameter",
            is_date=True,
        )  # will use custom timezone and date format provided above

        return web.json_response({
            "received_array_of_ints": my_tuple_of_ints,
            "received_str": my_str,
            "received_datetime": my_datetime.strftime(self.date_format),
        })
```

### Custom error response example
Sometimes you want to return custom error response instead of default HTTP 400.
Here's an example how to raise custom exception if validation fails: 
```python
from aiohttp import web

from aiohttp_parameter_parser import ParameterView


class CustomErrorResponseView(ParameterView):
    def validation_error_handler(self, msg: str) -> web.Response:
        # just override this method of base class
        # 'msg' is a human-readable explanation of validation error
        j = {
            "ok": False,
            "data": None,
            "error": {
                "description": msg,
            },
        }
        # you can use raise or return here
        return web.json_response(status=418, data=j)
```
eunomia 0.0.1.dev20
Simple configuration framework with custom backends, based on hydra config.
Requires Python: >=3.6

<p align="center">
    <h1 align="center">📜 Eunomia</h1>
    <p align="center">
        <i>A sane but flexible configuration framework.</i>
    </p>
</p>

<p align="center">
    <a href="https://choosealicense.com/licenses/mit/">
        <img alt="license" src="https://img.shields.io/github/license/nmichlo/eunomia?style=flat-square&color=lightgrey"/>
    </a>
    <a href="https://pypi.org/project/eunomia">
        <img alt="python versions" src="https://img.shields.io/pypi/pyversions/eunomia?style=flat-square"/>
    </a>
    <a href="https://pypi.org/project/eunomia">
        <img alt="pypi version" src="https://img.shields.io/pypi/v/eunomia?style=flat-square&color=blue"/>
    </a>
    <a href="https://github.com/nmichlo/eunomia/actions?query=workflow%3Atest">
        <img alt="tests status" src="https://img.shields.io/github/workflow/status/nmichlo/eunomia/test?label=tests&style=flat-square"/>
    </a>
    <a href="https://codecov.io/gh/nmichlo/eunomia/">
        <img alt="code coverage" src="https://img.shields.io/codecov/c/gh/nmichlo/eunomia?token=86IZK3J038&style=flat-square"/>
    </a>
    <a href="https://github.com/nmichlo/eunomia">
        <img alt="last commit" src="https://img.shields.io/github/last-commit/nmichlo/eunomia?style=flat-square&color=lightgrey"/>
    </a>
</p>

<p align="center">
    <p align="center">
        Visit the <a href="https://eunomia.dontpanic.sh/">docs</a> for more info.
    </p>
</p>

----------------------

### Overview

Simple [Hydra](https://github.com/facebookresearch/hydra) inspired configuration
library, supporting custom backends and variable substitution. Configs are defined as nested groups of mutually exclusive options
that can be selectively activated.

> The Horai, as they are called, to each of them, according as her name
> indicates, was given the ordering and adornment of life, so as to serve to
> the greatest advantage of mankind; for there is nothing which is better to
> build a life of felicity than obedience to law (Eunomia) and justice (Dike)
> and peace (Eirene).
> &mdash;&nbsp;[Diodorus&nbsp;Siculus](https://mythology.wikia.org/wiki/Eunomia)

### Getting Started

1. Install with: `pip install eunomia`

2. Visit the [docs](https://eunomia.dontpanic.sh)!

### Citing Eunomia

Please use the following citation if you use Eunomia in your research:

```bibtex
@Misc{Michlo2021Eunomia,
  author =       {Nathan Juraj Michlo},
  title =        {Eunomia - A sane but flexible configuration framework},
  howpublished = {Github},
  year =         {2021},
  url =          {https://github.com/nmichlo/eunomia}
}
```