Metadata-Version: 2.1
Name: python-soql-parser
Version: 0.1.4
Summary: A pyparsing-based library for parsing SOQL statements
Home-page: https://github.com/Kicksaw-Consulting/python-soql-parser
License: MIT
Keywords: python,soql,pyparsing,parsing,salesforce
Author: Alex Drozd
Author-email: drozdster@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: pyparsing (>=2.4.7,<3.0.0)
Project-URL: Repository, https://github.com/Kicksaw-Consulting/python-soql-parser
Description-Content-Type: text/markdown

**CONTRIBUTORS WANTED!!**

# Installation

`pip install python-soql-parser`

or, with poetry

`poetry add python-soql-parser`

# Usage

```python
from python_sql_parser import parse


parse_result = parse("SELECT Id FROM Account")
```

where `parse_result` is a [ParseResults](https://pyparsing-docs.readthedocs.io/en/latest/HowToUsePyparsing.html#parseresults) object from [pyparsing](https://github.com/pyparsing/pyparsing/).

# Notable unsupported features

- Related attributes (e.g., `SELECT Id, Account.Name FROM Contact`)
- Subqueries (e.g., `SELECT Name, (SELECT LastName FROM Contacts) FROM Account`)
- Aggregate queries
- SOQL specific WHERE-clause tokens (e.g., `LAST_N_DAYS:<integer>`)
- ORDER BY

# Contributing

A lot of work remains to be done. Practically no SOQL-specific features are supported as of yet.
If you want to contribute, just open a PR! (and add a test for your new feature)

## Setting up locally

First install [poetry](https://python-poetry.org/). Afterwards, to install the dependencies, run

```
poetry install
```

## Running the tests

Simply execute

```
pytest
```

## House cleaning

Please sort imports with `isort` and format the code with `black` (in that order).

