Skip to content

Commit 902767c

Browse files
authored
Merge pull request #29 from stackql/feature/refactor
added additional constructor args
2 parents bc48d55 + cbdac89 commit 902767c

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v3.2.5 (2023-12-07)
4+
5+
### Updates
6+
7+
* included `app_root` and `execution_concurrency_limit` options in `StackQL` constructor
8+
39
## v3.2.4 (2023-10-24)
410

511
### Updates

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ To publish the package to PyPI, run the following command:
193193

194194
::
195195

196-
twine upload dist/pystackql-3.2.4.tar.gz
196+
twine upload dist/pystackql-3.2.5.tar.gz

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '3.2.4'
29+
release = '3.2.5'
3030

3131

3232
# -- General configuration ---------------------------------------------------

pystackql/stackql.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ class StackQL:
3939
:param download_dir: The download directory for the StackQL executable
4040
(defaults to `site.getuserbase()`, not supported in `server_mode`)
4141
:type download_dir: str, optional
42+
:param app_root: Application config and cache root path
43+
(defaults to `{cwd}/.stackql`)
44+
:type app_root: str, optional
45+
:param execution_concurrency_limit: Concurrency limit for query execution
46+
(defaults to `1`, set to `-1` for unlimited)
47+
:type execution_concurrency_limit: int, optional
4248
:param api_timeout: API timeout
4349
(defaults to `45`, not supported in `server_mode`)
4450
:type api_timeout: int, optional
@@ -204,6 +210,8 @@ def __init__(self,
204210
server_address='127.0.0.1',
205211
server_port=5466,
206212
download_dir=None,
213+
app_root=None,
214+
execution_concurrency_limit=1,
207215
output='dict',
208216
custom_auth=None,
209217
sep=',',
@@ -290,6 +298,17 @@ def __init__(self,
290298
_setup(self.download_dir, this_os)
291299
self.version, self.sha = _get_version(self.bin_path)
292300

301+
# if app_root is set, use it
302+
if app_root is not None:
303+
self.app_root = app_root
304+
self.params.append("--approot")
305+
self.params.append(app_root)
306+
307+
# set execution_concurrency_limit
308+
self.execution_concurrency_limit = execution_concurrency_limit
309+
self.params.append("--execution.concurrency.limit")
310+
self.params.append(str(execution_concurrency_limit))
311+
293312
# if custom_auth is set, use it
294313
if custom_auth is not None:
295314
authobj, authstr = _format_auth(custom_auth)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='pystackql',
13-
version='3.2.4',
13+
version='3.2.5',
1414
description='A Python interface for StackQL',
1515
long_description=readme,
1616
author='Jeffrey Aven',

0 commit comments

Comments
 (0)