Metadata-Version: 2.1
Name: datasiphon
Version: 0.2.1
Summary: Dynamic building of filtered database queries
Author-email: Marek Nemeth <99m.nemeth@gmail.com>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/Nemulo/libs-datasiphon
Project-URL: Bug Tracker, https://github.com/Nemulo/libs-datasiphon/issues
Project-URL: Documentation, https://github.com/Nemulo/libs-datasiphon/blob/main/README.md
Keywords: database,sql,filtering,query
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: sqlalchemy >=2.0.0
Requires-Dist: pymongo >=4.5.0

# Datasiphon

Package for applying dictionary filter to some form of query on database to retrieve filtered data or acquire filtered query

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install datasiphon.

```bash
pip install datasiphon
```

## Usage

```python
from siphon import build, sql
import sqlalchemy as sa
# Create a filter
filter_ = {
    "name": {"eq": "John"},
}

table = sa.Table("users", sa.MetaData(), autoload=True, autoload_with=engine)
# Build a query
query = table.select()
# apply filter using build function
query = build(query, sql.SQl, filter_)
# execute query
result = engine.execute(query)
...
```

## Currently Supported Databases

- SQL (using sqlalchemy)
