semvec/pypi-packages huggingface dataset:
sqlalchemy_filter_converter 1.4.0
SQLAlchemy filter converters.
License: MIT
Requires Python: >=3.11


# SQLAlchemy filter converter

![coverage](./coverage.svg)

## For what?

I made this package to use filters from query parameters in my applications.

## Install

To install the package you need you run the following commands.

For pip:

```bash
pip install "sqlalchemy_filter_converter"
```

For poetry:

```bash
poetry add sqlalchemy_filter_converter
```

For PDM:

```bash
pdm add sqlalchemy_filter_converter
```

## Filter Types

Converters for SQLAlchemy filters. Now available 3 converters:

1. Simple filter converter (key-value with equals operator).
2. Advanced filter converter (key-value with custom operators).
3. Django filter converter (Django filters adapter with double underscore lookups).

Filters must be provided in a dict or list or dicts and will be applied sequentially.

### Simple filters

Simple filters are simle. There are `key` - `value` dicts, which converts to SQLAlchemy
filters with `==` operator.

You can use one dict with all filters, or list of dicts. There is no difference.

```python
from sqlalchemy_filter_converter import SimpleFilterConverter

filter_spec = [
    {'field_name_1': 123, 'field_name_2': 'value'},
    {'other_name_1': 'other_value', 'other_name_2': 123},
    # ...
]
```

No other specific usages presents. it is simple.

### Advanced filters

Advanced filters continues the idea of simple-filter, but add operator key.

```python
{
    "field": "my_field",
    "value": 25,
    "operator": ">",
}
```

or

```python
[
    {
        "field": "my_id_field",
        "value": [1,2,3,4,5],
        "operator": "contains",
    },
    {
        "field": "my_bool_field",
        "value": False,
        "operator": "is_not",
    },
]
```

This is the list of operators that can be used:

- `=`
- `>`
- `<`
- `>`'
- `<=`
- `is`
- `is_not`
- `between`
- `contains`

### Django filters

Django filters implements django ORM adapter for filters. You can use filters like
`my_field__iexact=25` or `my_dt_field__date__ge=datetime.date(2023, 3, 12)`. See django
documentation for more information.

Now implements all field filters, except nester relationships.

This is the list of operators that can be used:

- `exact`
- `iexact`
- `contains`
- `icontains`
- `in`
- `gt`
- `gte`
- `lt`
- `lte`
- `startswith`
- `istartswith`
- `endswith`
- `iendswith`
- `range`
- `date`
- `year`
- `iso_year`
- `month`
- `day`
- `week`
- `week_day`
- `iso_week_day`
- `quarter`
- `time`
- `hour`
- `minute`
- `second`
- `isnull`
- `regex`
- `iregex`
mt5linux-updated 0.0.1
MetaTrader5 for linux users updated to lasted libraries
License: MIT
Requires Python: <4.0,>=3.10
Keywords: MetaTrader, Metatrader5


<table style="border: 1px solid transparent">
  <tr>
    <td>
<a href="https://talky.readthedocs.io"><img src="https://img.shields.io/badge/Wiki-%23000000.svg?style=for-the-badge&logo=wikipedia&logoColor=white"></a>
<a href="https://github.com/mraniki/tt/"><img src="https://img.shields.io/badge/github-%23000000.svg?style=for-the-badge&logo=github&logoColor=white"></a>

<a href="https://hub.docker.com/r/mraniki/tt"><img src="https://img.shields.io/docker/pulls/mraniki/tt?style=for-the-badge"></a>
<br>
    </td>
    <td align="center"><img width="200" alt="Logo" src="/docs/_static/logo-full.png"></td>
  </tr>
  <tr>
    <td>
      <a href="https://pypi.org/project/xxxxxxx/"><img src="https://img.shields.io/pypi/v/xxxxxxx?style=for-the-badge&logo=PyPI&logoColor=white"></a><br>
      <a href="https://pypi.org/project/xxxxxxx/"><img src="https://img.shields.io/pypi/dm/xxxxxxx?style=for-the-badge&logo=PyPI&logoColor=white&label=pypi&labelColor=grey"></a><br>
      <a href="https://github.com/mraniki/xxxxxxx/"><img src="https://img.shields.io/github/actions/workflow/status/mraniki/xxxxxxx/%F0%9F%91%B7Flow.yml?style=for-the-badge&logo=GitHub&logoColor=white"></a><br>
   <a href="https://talky.readthedocs.io/"><img src="https://readthedocs.org/projects/xxxxxxx/badge/?version=latest&style=for-the-badge"></a><br>
   <a href="https://codebeat.co/projects/github-com-mraniki-xxxxxxx-main"><img src="https://codebeat.co/badges/xxxxxxx"/></a><br>
   <a href="https://codecov.io/gh/mraniki/xxxxxxx"> <img src="https://codecov.io/gh/mraniki/iamlistening/branch/main/graph/badge.svg?token=xxxxxxx"/></a><br>
    </td>
    <td align="left"> 
      Updated version of https://github.com/lucas-campagna/mt5linux<br>
      
    </td>
     
  </tr>
</table>

<h5>How to use it</h5>
<pre>
<code>
    Refer to https://github.com/lucas-campagna/mt5linux
</code>
</pre>


<h5>Documentation</h5>
<a href="https://talky.readthedocs.io/projects/xxxxxxx/en/latest/"><img src="https://img.shields.io/badge/Documentation-000000?style=for-the-badge&logo=readthedocs&logoColor=white"></a><br>