Skip to content

Commit e96f9ab

Browse files
committed
Merge branch 'master' of github.com:SlicingDice/slicingdice-python
2 parents 2642be4 + 0fb1e04 commit e96f9ab

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,31 @@ print(client.sql(query))
867867
}
868868
```
869869

870+
### `sql(query)`
871+
Retrieve inserted values using a SQL syntax. This method corresponds to a POST request at /query/sql.
872+
873+
#### Request example
874+
875+
```python
876+
from pyslicer import SlicingDice
877+
client = SlicingDice('MASTER_OR_READ_API_KEY')
878+
query = "SELECT COUNT(*) FROM default WHERE age BETWEEN 0 AND 49"
879+
print(client.sql(query))
880+
```
881+
882+
#### Output example
883+
884+
```json
885+
{
886+
"took":0.063,
887+
"result":[
888+
{"COUNT": 3}
889+
],
890+
"count":1,
891+
"status":"success"
892+
}
893+
```
894+
870895
## License
871896

872897
[MIT](https://opensource.org/licenses/MIT)

0 commit comments

Comments
 (0)