From b59958d5761c70443576bdfabcbd11d517bb76d2 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Tue, 10 Sep 2019 17:23:18 +0200
Subject: [PATCH 01/23] removing dev version

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index ca3bf82..74e5d60 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def load_tests():
 
 setup(
     name = 'wolframwebengine',
-    version = '1.0.0.dev1',
+    version = '1.0.0',
     description = 'A Python library with various tools to start a wolfram engine a server content.',
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',

From 833bcac4f53475bc3374ad028acf30a9120ae246 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 26 Sep 2019 17:32:08 +0200
Subject: [PATCH 02/23] adding missing assets in the distribution

---
 MANIFEST.in                                       | 4 ++++
 setup.py                                          | 2 +-
 wolframwebengine/cli/commands/benchmark_server.py | 6 +++---
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index a75f28c..13747c8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,7 @@
 include LICENSE PacletInfo.m run.py
 recursive-include wolframwebengine *.m
+recursive-include wolframwebengine *.wl
+recursive-include wolframwebengine *.wxf
+recursive-include wolframwebengine *.mx
+recursive-include wolframwebengine *.json
 recursive-include wolframwebengine/tests *.py
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 74e5d60..7e3db3d 100644
--- a/setup.py
+++ b/setup.py
@@ -27,10 +27,10 @@ def load_tests():
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',
     author_email = 'support@wolfram.com, riccardod@wolfram.com',
-    include_package_data=True,
     packages=find_packages(),
     test_suite='setup.load_tests',
     python_requires='>=3.5.3',
+    include_package_data=True,
     install_requires = [
         'wolframclient>=1.1.0',
         'aiohttp>=3.5.4'
diff --git a/wolframwebengine/cli/commands/benchmark_server.py b/wolframwebengine/cli/commands/benchmark_server.py
index a118cd0..320ce5b 100644
--- a/wolframwebengine/cli/commands/benchmark_server.py
+++ b/wolframwebengine/cli/commands/benchmark_server.py
@@ -5,8 +5,8 @@
 
 from wolframclient.cli.utils import SimpleCommand
 from wolframclient.serializers import export
-from wolframclient.utils.api import aiohttp
-from wolframclient.utils.asyncio import run_in_loop, wait_all
+from wolframclient.utils.api import aiohttp, asyncio
+from wolframclient.utils.asyncio import run_in_loop
 from wolframclient.utils.encoding import force_text
 from wolframclient.utils.functional import iterate
 
@@ -62,7 +62,7 @@ def generate_tasks(self, requests, clients, url):
     @run_in_loop
     async def wait_for_tasks(self, requests, clients, url):
         # Wait for all of the coroutines to finish.
-        results = await wait_all(self.generate_tasks(requests, clients, url))
+        results = await asyncio.gather(*self.generate_tasks(requests, clients, url))
         results = tuple(iterate(*results))
         return results
 

From 837030315abbe3a3d3e6f425299c12a1d04cd927 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 26 Sep 2019 17:33:38 +0200
Subject: [PATCH 03/23] new version

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 7e3db3d..b9ed44f 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def load_tests():
 
 setup(
     name = 'wolframwebengine',
-    version = '1.0.0',
+    version = '1.0.1',
     description = 'A Python library with various tools to start a wolfram engine a server content.',
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',

From e5f100128ef6294c2329969262936a547b246564 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Tue, 22 Oct 2019 14:09:09 -0500
Subject: [PATCH 04/23] automatic code refactor

---
 wolframwebengine/cli/commands/runserver.py | 2 +-
 wolframwebengine/web/utils.py              | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index ea62672..e35bf72 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -135,7 +135,7 @@ async def main():
 
             self.print_separator()
 
-            if sys.platform == 'win32':
+            if sys.platform == "win32":
                 self.print_line("(Press CTRL+BREAK to quit)")
             else:
                 self.print_line("(Press CTRL+C to quit)")
diff --git a/wolframwebengine/web/utils.py b/wolframwebengine/web/utils.py
index d28baff..31d7eaf 100644
--- a/wolframwebengine/web/utils.py
+++ b/wolframwebengine/web/utils.py
@@ -31,9 +31,9 @@ def make_generate_httpresponse_expression(request, expression):
 
 def process_generate_httpresponse_expression(response):
     if isinstance(response, dict):
-        if not response.get('BodyByteArray', None):
-            #empty byte array is returning a an empty list, we need an empty byte array
-            response['BodyByteArray'] = b''
+        if not response.get("BodyByteArray", None):
+            # empty byte array is returning a an empty list, we need an empty byte array
+            response["BodyByteArray"] = b""
         return response
     return {
         "BodyByteArray": export(response, target_format="wl"),

From 09451623d530cc6ad05de70288e8ed1dded65784 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Tue, 22 Oct 2019 14:10:24 -0500
Subject: [PATCH 05/23] adding a manage file for the example app

---
 wolframwebengine/examples/djangoapp/manage.py | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 wolframwebengine/examples/djangoapp/manage.py

diff --git a/wolframwebengine/examples/djangoapp/manage.py b/wolframwebengine/examples/djangoapp/manage.py
new file mode 100644
index 0000000..69b19fd
--- /dev/null
+++ b/wolframwebengine/examples/djangoapp/manage.py
@@ -0,0 +1,25 @@
+from __future__ import absolute_import, print_function, unicode_literals
+
+import sys
+
+
+def main():
+    try:
+        from django.core.management import execute_from_command_line
+        from django.conf import settings
+    except ImportError as exc:
+        raise ImportError(
+            "Couldn't import Django. Are you sure it's installed and "
+            "available on your PYTHONPATH environment variable? Did you "
+            "forget to activate a virtual environment?"
+        ) from exc
+
+    settings.configure(
+        ROOT_URLCONF="wolframwebengine.examples.djangoapp.urls", ALLOWED_HOSTS="*", DEBUG=True
+    )
+
+    execute_from_command_line(sys.argv)
+
+
+if __name__ == "__main__":
+    main()

From 02cc334213e695d8fe7bd0cac07cda6dbe682825 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Tue, 22 Oct 2019 14:13:28 -0500
Subject: [PATCH 06/23] incrementing version

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index b9ed44f..401dd4a 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def load_tests():
 
 setup(
     name = 'wolframwebengine',
-    version = '1.0.1',
+    version = '1.0.2',
     description = 'A Python library with various tools to start a wolfram engine a server content.',
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',

From 200a9a43c56e244ea078815e38bd5a05c5776e09 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 21 Nov 2019 14:49:53 +0100
Subject: [PATCH 07/23] new form page

---
 wolframwebengine/examples/demo/form.wl | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/wolframwebengine/examples/demo/form.wl b/wolframwebengine/examples/demo/form.wl
index 23183bd..c0dfa22 100644
--- a/wolframwebengine/examples/demo/form.wl
+++ b/wolframwebengine/examples/demo/form.wl
@@ -1,9 +1,10 @@
-FormFunction[
-    {"image" -> "Image", "filter" -> ImageEffect[]}, 
-    ImageEffect[#image, #filter] &,
-    "PNG",
+FormPage[
+    {"From" -> "City", "To" -> "City"}, 
+    GeoGraphics[
+        Style[Line[TravelDirections[{#From, #To}]], Thick, Red]
+    ] &, 
     AppearanceRules -> <|
-        "Title" -> "Welcome to Wolfram Web Engine",
+        "Title" -> "Get travel directions for your trip",
         "Description" -> TemplateApply["This is a sample application running on a `` Kernel.", $VersionNumber]
     |>
 ]
\ No newline at end of file

From db26e508ddee5b632296feedbefe30ce517070b7 Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Mon, 12 Apr 2021 13:41:54 -0400
Subject: [PATCH 08/23] Add Dockerfile

---
 Dockerfile | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..74a92ca
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,19 @@
+FROM wolframresearch/wolframengine:latest
+
+USER root
+
+RUN apt-get update -y && \
+  apt-get install -y python3 python3-pip
+
+RUN pip3 install wolframclient
+
+COPY . /tmp/build
+RUN pip3 install /tmp/build && \
+  rm -r /tmp/build && \
+  chown -R wolframengine /srv
+
+USER wolframengine
+EXPOSE 18000
+
+ENTRYPOINT ["/usr/bin/python3", "-m", "wolframwebengine", "--domain", "0.0.0.0"]
+CMD ["/srv"]
\ No newline at end of file

From fc2e8146a63a7298d737ebe2f9cc94db5843a7ef Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Mon, 12 Apr 2021 13:59:32 -0400
Subject: [PATCH 09/23] Add information on Docker image to README.md

---
 README.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/README.md b/README.md
index d672e62..3ea1879 100644
--- a/README.md
+++ b/README.md
@@ -148,6 +148,27 @@ http://localhost:18000/static.json
 One advantage of a multi-file application structure is that is very easy to extend the application. You can simply place new files into the appropriate location in your application directory and they will automatically be served.
 
 
+## Using Docker
+
+Wolfram Web Engine for Python is available as [a container image from Docker Hub](https://hub.docker.com/r/wolframresearch/wolframwebengineforpython) for use in containerized environments.
+
+```
+# exposes the server on port 8080 of the host machine
+>>> docker run -ti -p 8080:18000 wolframresearch/wolframwebengineforpython --demo
+
+# serve files from the /srv directory
+>>> docker run -ti -p 8080:18000 wolframresearch/wolframwebengineforpython /srv
+```
+
+This image is based on the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine); information on product activation and license terms is available on the [Docker Hub page](https://hub.docker.com/r/wolframresearch/wolframengine) for the latter image.
+
+Note regarding on-demand licensing: As Wolfram Web Engine for Python does not use WolframScript, the `-entitlement` command-line option and the `WOLFRAMSCRIPT_ENTITLEMENTID` environment variable are not sufficient to pass an on-demand license entitlement ID to the Wolfram Engine kernel inside this image. As a workaround, the `WOLFRAMINIT` environment variable can be set to pass both the entitlement ID and the license server address to the kernel:
+
+```
+>>> docker run -ti -p 8080:18000 --env WOLFRAMINIT='-pwfile !cloudlm.wolfram.com -entitlement O-WSTD-DA42-GKX4Z6NR2DSZR' wolframresearch/wolframwebengineforpython --demo
+```
+
+
 ## Options
 
 ```

From d3e9f1d8812a917b7d2e7a2c70ffad5272da081a Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Mon, 12 Apr 2021 14:00:15 -0400
Subject: [PATCH 10/23] Condense some RUN commands in the Dockerfile

---
 Dockerfile | 5 ++---
 README.md  | 7 +++++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 74a92ca..87ae9a6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,9 +3,8 @@ FROM wolframresearch/wolframengine:latest
 USER root
 
 RUN apt-get update -y && \
-  apt-get install -y python3 python3-pip
-
-RUN pip3 install wolframclient
+  apt-get install -y python3 python3-pip && \
+  pip3 install wolframclient
 
 COPY . /tmp/build
 RUN pip3 install /tmp/build && \
diff --git a/README.md b/README.md
index 3ea1879..137f550 100644
--- a/README.md
+++ b/README.md
@@ -152,6 +152,8 @@ One advantage of a multi-file application structure is that is very easy to exte
 
 Wolfram Web Engine for Python is available as [a container image from Docker Hub](https://hub.docker.com/r/wolframresearch/wolframwebengineforpython) for use in containerized environments.
 
+This image is based on the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine); information on product activation and license terms is available on the [Docker Hub page](https://hub.docker.com/r/wolframresearch/wolframengine) for the latter image.
+
 ```
 # exposes the server on port 8080 of the host machine
 >>> docker run -ti -p 8080:18000 wolframresearch/wolframwebengineforpython --demo
@@ -160,9 +162,10 @@ Wolfram Web Engine for Python is available as [a container image from Docker Hub
 >>> docker run -ti -p 8080:18000 wolframresearch/wolframwebengineforpython /srv
 ```
 
-This image is based on the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine); information on product activation and license terms is available on the [Docker Hub page](https://hub.docker.com/r/wolframresearch/wolframengine) for the latter image.
+The commands above do not include activation/licensing configuration; see the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine) for information on activating the Wolfram Engine kernel.
+
 
-Note regarding on-demand licensing: As Wolfram Web Engine for Python does not use WolframScript, the `-entitlement` command-line option and the `WOLFRAMSCRIPT_ENTITLEMENTID` environment variable are not sufficient to pass an on-demand license entitlement ID to the Wolfram Engine kernel inside this image. As a workaround, the `WOLFRAMINIT` environment variable can be set to pass both the entitlement ID and the license server address to the kernel:
+Note regarding on-demand licensing: As Wolfram Web Engine for Python does not use WolframScript, the `-entitlement` command-line option and the `WOLFRAMSCRIPT_ENTITLEMENTID` environment variable cannot be used to pass an on-demand license entitlement ID to the Wolfram Engine kernel inside this image. As a workaround, the `WOLFRAMINIT` environment variable can be set to pass both the entitlement ID and the license server address to the kernel:
 
 ```
 >>> docker run -ti -p 8080:18000 --env WOLFRAMINIT='-pwfile !cloudlm.wolfram.com -entitlement O-WSTD-DA42-GKX4Z6NR2DSZR' wolframresearch/wolframwebengineforpython --demo

From a5bba7b31cac7b8c37c51ba57c424568a7fb5fb8 Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Tue, 13 Apr 2021 12:01:57 -0400
Subject: [PATCH 11/23] Add some linebreaks to README.md

---
 README.md | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 137f550..82aa70c 100644
--- a/README.md
+++ b/README.md
@@ -152,7 +152,8 @@ One advantage of a multi-file application structure is that is very easy to exte
 
 Wolfram Web Engine for Python is available as [a container image from Docker Hub](https://hub.docker.com/r/wolframresearch/wolframwebengineforpython) for use in containerized environments.
 
-This image is based on the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine); information on product activation and license terms is available on the [Docker Hub page](https://hub.docker.com/r/wolframresearch/wolframengine) for the latter image.
+This image is based on the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine); information on product activation and license terms
+is available on the [Docker Hub page](https://hub.docker.com/r/wolframresearch/wolframengine) for the latter image.
 
 ```
 # exposes the server on port 8080 of the host machine
@@ -165,7 +166,9 @@ This image is based on the [official Wolfram Engine Docker image](https://hub.do
 The commands above do not include activation/licensing configuration; see the [official Wolfram Engine Docker image](https://hub.docker.com/r/wolframresearch/wolframengine) for information on activating the Wolfram Engine kernel.
 
 
-Note regarding on-demand licensing: As Wolfram Web Engine for Python does not use WolframScript, the `-entitlement` command-line option and the `WOLFRAMSCRIPT_ENTITLEMENTID` environment variable cannot be used to pass an on-demand license entitlement ID to the Wolfram Engine kernel inside this image. As a workaround, the `WOLFRAMINIT` environment variable can be set to pass both the entitlement ID and the license server address to the kernel:
+Note regarding on-demand licensing: As Wolfram Web Engine for Python does not use WolframScript, the `-entitlement` command-line option and the `WOLFRAMSCRIPT_ENTITLEMENTID`
+environment variable cannot be used to pass an on-demand license entitlement ID to the Wolfram Engine kernel inside this image.
+As a workaround, the `WOLFRAMINIT` environment variable can be set to pass both the entitlement ID and the license server address to the kernel:
 
 ```
 >>> docker run -ti -p 8080:18000 --env WOLFRAMINIT='-pwfile !cloudlm.wolfram.com -entitlement O-WSTD-DA42-GKX4Z6NR2DSZR' wolframresearch/wolframwebengineforpython --demo

From 0960225dc4855a8efc4d41cb537066b9d21fc12f Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Tue, 13 Apr 2021 12:12:41 -0400
Subject: [PATCH 12/23] Change `pip3` to `python3 -m pip` in Dockerfile

---
 Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 87ae9a6..9e493f9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ USER root
 
 RUN apt-get update -y && \
   apt-get install -y python3 python3-pip && \
-  pip3 install wolframclient
+  python3 -m pip install wolframclient
 
 COPY . /tmp/build
 RUN pip3 install /tmp/build && \

From c78cd9ecff0461ce70542e0ec1d1c2fad0615da7 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 15 Apr 2021 14:57:06 +0200
Subject: [PATCH 13/23] kernel_loglevel

---
 wolframwebengine/server/app.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/wolframwebengine/server/app.py b/wolframwebengine/server/app.py
index df55e19..36c0a22 100644
--- a/wolframwebengine/server/app.py
+++ b/wolframwebengine/server/app.py
@@ -1,6 +1,6 @@
 from __future__ import absolute_import, print_function, unicode_literals
 
-import os
+import os, logging
 
 from aiohttp import web
 
@@ -29,15 +29,16 @@ def get_wl_handler(path):
     return EXTENSIONS[last(os.path.splitext(path)).lower()]
 
 
-def create_session(path=None, poolsize=1, inputform_string_evaluation=False, **opts):
+def create_session(path=None, poolsize=1, inputform_string_evaluation=False, kernel_loglevel=logging.INFO, **opts):
     if poolsize <= 1:
         return WolframLanguageAsyncSession(
-            path, inputform_string_evaluation=inputform_string_evaluation, **opts
+            path, inputform_string_evaluation=inputform_string_evaluation, kernel_loglevel = kernel_loglevel, **opts
         )
     return WolframEvaluatorPool(
         path,
         poolsize=poolsize,
         inputform_string_evaluation=inputform_string_evaluation,
+        kernel_loglevel=kernel_loglevel,
         **opts
     )
 

From 2ca9edd0092866722f2bd5559c8581214302911a Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 15 Apr 2021 14:58:10 +0200
Subject: [PATCH 14/23] code lint

---
 wolframwebengine/cli/commands/runserver.py      |  1 -
 .../examples/aiohttp_application.py             |  1 -
 wolframwebengine/examples/djangoapp/manage.py   |  2 +-
 wolframwebengine/examples/djangoapp/urls.py     |  1 -
 wolframwebengine/server/app.py                  | 17 +++++++++++++----
 wolframwebengine/tests/application_aiohttp.py   |  1 -
 wolframwebengine/tests/application_django.py    |  1 -
 wolframwebengine/web/django.py                  |  1 -
 8 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index e35bf72..52ccd41 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -6,7 +6,6 @@
 
 from aiohttp import web
 from aiohttp.abc import AbstractAccessLogger
-
 from wolframclient.cli.utils import SimpleCommand
 from wolframclient.exception import WolframKernelException
 from wolframclient.utils.api import asyncio
diff --git a/wolframwebengine/examples/aiohttp_application.py b/wolframwebengine/examples/aiohttp_application.py
index bbed942..4c171a8 100644
--- a/wolframwebengine/examples/aiohttp_application.py
+++ b/wolframwebengine/examples/aiohttp_application.py
@@ -1,7 +1,6 @@
 from __future__ import absolute_import, print_function, unicode_literals
 
 from aiohttp import web
-
 from wolframclient.evaluation import WolframEvaluatorPool
 from wolframclient.language import wl
 from wolframwebengine.web import aiohttp_wl_view
diff --git a/wolframwebengine/examples/djangoapp/manage.py b/wolframwebengine/examples/djangoapp/manage.py
index 69b19fd..78aef40 100644
--- a/wolframwebengine/examples/djangoapp/manage.py
+++ b/wolframwebengine/examples/djangoapp/manage.py
@@ -5,8 +5,8 @@
 
 def main():
     try:
-        from django.core.management import execute_from_command_line
         from django.conf import settings
+        from django.core.management import execute_from_command_line
     except ImportError as exc:
         raise ImportError(
             "Couldn't import Django. Are you sure it's installed and "
diff --git a/wolframwebengine/examples/djangoapp/urls.py b/wolframwebengine/examples/djangoapp/urls.py
index 995d436..5731a99 100644
--- a/wolframwebengine/examples/djangoapp/urls.py
+++ b/wolframwebengine/examples/djangoapp/urls.py
@@ -2,7 +2,6 @@
 
 from django.http import HttpResponse
 from django.urls import path
-
 from wolframclient.evaluation import WolframLanguageSession
 from wolframclient.language import wl
 from wolframwebengine.web import django_wl_view
diff --git a/wolframwebengine/server/app.py b/wolframwebengine/server/app.py
index 36c0a22..b1e5f87 100644
--- a/wolframwebengine/server/app.py
+++ b/wolframwebengine/server/app.py
@@ -1,9 +1,9 @@
 from __future__ import absolute_import, print_function, unicode_literals
 
-import os, logging
+import logging
+import os
 
 from aiohttp import web
-
 from wolframclient.evaluation import WolframEvaluatorPool, WolframLanguageAsyncSession
 from wolframclient.language import wl
 from wolframclient.utils.functional import last
@@ -29,10 +29,19 @@ def get_wl_handler(path):
     return EXTENSIONS[last(os.path.splitext(path)).lower()]
 
 
-def create_session(path=None, poolsize=1, inputform_string_evaluation=False, kernel_loglevel=logging.INFO, **opts):
+def create_session(
+    path=None,
+    poolsize=1,
+    inputform_string_evaluation=False,
+    kernel_loglevel=logging.INFO,
+    **opts
+):
     if poolsize <= 1:
         return WolframLanguageAsyncSession(
-            path, inputform_string_evaluation=inputform_string_evaluation, kernel_loglevel = kernel_loglevel, **opts
+            path,
+            inputform_string_evaluation=inputform_string_evaluation,
+            kernel_loglevel=kernel_loglevel,
+            **opts
         )
     return WolframEvaluatorPool(
         path,
diff --git a/wolframwebengine/tests/application_aiohttp.py b/wolframwebengine/tests/application_aiohttp.py
index a35c7f3..44ad279 100644
--- a/wolframwebengine/tests/application_aiohttp.py
+++ b/wolframwebengine/tests/application_aiohttp.py
@@ -5,7 +5,6 @@
 from aiohttp import web
 from aiohttp.formdata import FormData
 from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
-
 from wolframclient.language import wl
 from wolframclient.utils.functional import first
 from wolframclient.utils.importutils import module_path
diff --git a/wolframwebengine/tests/application_django.py b/wolframwebengine/tests/application_django.py
index a0b2902..88e1129 100644
--- a/wolframwebengine/tests/application_django.py
+++ b/wolframwebengine/tests/application_django.py
@@ -2,7 +2,6 @@
 
 from django.core.files.uploadedfile import SimpleUploadedFile
 from django.test import Client
-
 from wolframclient.utils.api import json
 from wolframclient.utils.functional import first
 from wolframclient.utils.tests import TestCase as BaseTestCase
diff --git a/wolframwebengine/web/django.py b/wolframwebengine/web/django.py
index 7e4c31d..62b0b7b 100644
--- a/wolframwebengine/web/django.py
+++ b/wolframwebengine/web/django.py
@@ -4,7 +4,6 @@
 from operator import attrgetter
 
 from django.http import HttpResponse
-
 from wolframclient.language import wl
 from wolframclient.utils.decorators import to_dict
 from wolframclient.utils.functional import first, iterate, last

From 81615ee307298e050a2bc94fa79cd7dcbcb064d0 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Thu, 8 Jul 2021 08:50:04 +0200
Subject: [PATCH 15/23] adding initfile

---
 wolframwebengine/cli/commands/runserver.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index e35bf72..42445fe 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -38,6 +38,7 @@ def add_arguments(self, parser):
         parser.add_argument("--port", default=18000, help="Insert the port.")
         parser.add_argument("--domain", default="localhost", help="Insert the domain.")
         parser.add_argument("--kernel", default=None, help="Insert the kernel path.")
+        parser.add_argument("--initfile", default=None, help="Insert the initfile path.")
         parser.add_argument(
             "--poolsize", default=1, help="Insert the kernel pool size.", type=int
         )
@@ -88,7 +89,7 @@ def demo_choices(self):
     def demo_path(self, *args):
         return module_path("wolframwebengine", "examples", "demo", *args)
 
-    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, **opts):
+    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfile, **opts):
 
         if demo is None or demo:
             path = self.demo_path(self.demo_choices[demo])
@@ -96,7 +97,7 @@ def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, **opts
         path = os.path.abspath(os.path.expanduser(path))
 
         try:
-            session = create_session(kernel, poolsize=poolsize)
+            session = create_session(kernel, poolsize=poolsize, initfile=initfile)
 
         except WolframKernelException as e:
             self.print(e)

From 047787990b718a629e1e22d46d564a46db0994f1 Mon Sep 17 00:00:00 2001
From: Jesse Friedman <jessef@wolfram.com>
Date: Fri, 27 Aug 2021 11:25:33 -0400
Subject: [PATCH 16/23] Add --startuptimeout CLI option to adjust
 WolframClientForPython kernel startup timeout

---
 README.md                                  | 20 ++++++++++++++++++++
 wolframwebengine/cli/commands/runserver.py | 17 +++++++++++++++--
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 82aa70c..d914efe 100644
--- a/README.md
+++ b/README.md
@@ -193,6 +193,8 @@ optional arguments:
   --domain DOMAIN       Insert the domain.
   --kernel KERNEL       Insert the kernel path.
   --poolsize POOLSIZE   Insert the kernel pool size.
+  --startuptimeout SECONDS
+                        Startup timeout (in seconds) for kernels in the pool.
   --cached              The server will cache the WL input expression.
   --lazy                The server will start the kernels on the first
                         request.
@@ -320,6 +322,24 @@ Index           index.wl
 (Press CTRL+C to quit)
 ```
 
+#### --startuptimeout SECONDS
+
+By default, an attempt to start a kernel will be aborted if the kernel is not ready after 20 seconds. If your application contains long-running initialization code, you may need to raise this timeout.
+```
+>>> python3 -m wolframwebengine
+(...)
+Kernel process started with PID: 485
+Socket exception: Failed to read any message from socket tcp://127.0.0.1:5106 after 20.0 seconds and 245 retries.
+Failed to start.
+
+
+>>> python3 -m wolframwebengine --startuptimeout 50
+(...)
+Kernel process started with PID: 511
+Connected to logging socket: tcp://127.0.0.1:5447
+Kernel 511 is ready. Startup took 35.43 seconds.
+```
+
 #### --lazy 
 
 If the option is present the server will wait for the first request to spawn the kernels, instead of spawning them immediately.
diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index e35bf72..7228eff 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -41,6 +41,13 @@ def add_arguments(self, parser):
         parser.add_argument(
             "--poolsize", default=1, help="Insert the kernel pool size.", type=int
         )
+        parser.add_argument(
+            "--startuptimeout",
+            default=20,
+            help="Startup timeout (in seconds) for kernels in the pool.",
+            type=int,
+            metavar="SECONDS"
+        )
         parser.add_argument(
             "--cached",
             default=False,
@@ -88,7 +95,10 @@ def demo_choices(self):
     def demo_path(self, *args):
         return module_path("wolframwebengine", "examples", "demo", *args)
 
-    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, **opts):
+    def handle(self,
+        domain, port, path, kernel, poolsize, startuptimeout, 
+        lazy, index, demo, **opts
+    ):
 
         if demo is None or demo:
             path = self.demo_path(self.demo_choices[demo])
@@ -96,7 +106,10 @@ def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, **opts
         path = os.path.abspath(os.path.expanduser(path))
 
         try:
-            session = create_session(kernel, poolsize=poolsize)
+            session = create_session(kernel,
+                poolsize=poolsize,
+                STARTUP_TIMEOUT=startuptimeout
+            )
 
         except WolframKernelException as e:
             self.print(e)

From c343c8987c0dc358d1200b91762600942e0fe49d Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 18 Oct 2021 14:22:50 +0300
Subject: [PATCH 17/23] adding maximum amount for client size

---
 README.md                                  | 13 ++++++++++++
 wolframwebengine/cli/commands/runserver.py | 23 ++++++++++++++++++----
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 82aa70c..f062ccf 100644
--- a/README.md
+++ b/README.md
@@ -325,6 +325,19 @@ Index           index.wl
 If the option is present the server will wait for the first request to spawn the kernels, instead of spawning them immediately.
 
 
+#### --client_max_size MB
+
+The maximum amount of megabytes allowed for file upload. Defaults to 10.
+```
+>>> python3 -m wolframwebengine --client_max_size 150
+----------------------------------------------------------------------
+Address         http://localhost:18000/
+Folder          /Users/rdv/Desktop
+Index           index.wl
+----------------------------------------------------------------------
+(Press CTRL+C to quit)
+```
+
 ## Integrating an existing application
 
 Wolfram Web Engine for Python can be used to augment an existing python application instead of creating a new one.
diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index 2a718bb..824d20c 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -3,7 +3,7 @@
 import logging
 import os
 import sys
-
+from functools import partial
 from aiohttp import web
 from aiohttp.abc import AbstractAccessLogger
 from wolframclient.cli.utils import SimpleCommand
@@ -22,6 +22,7 @@ def log(self, request, response, time):
         )
 
 
+
 class Command(SimpleCommand):
     """ Run test suites from the tests modules.
     A list of patterns can be provided to specify the tests to run.
@@ -65,6 +66,14 @@ def add_arguments(self, parser):
             choices=tuple(self.demo_choices.keys()),
         )
 
+        parser.add_argument(
+            "--client_max_size",
+            default = 10,
+            dest = "client_max_size",
+            help = "Maximum size of client uploads, in Mb",
+            type = float
+        )
+
     def print_line(self, f="", s=""):
         self.print(f.ljust(15), s)
 
@@ -88,13 +97,15 @@ def demo_choices(self):
     def demo_path(self, *args):
         return module_path("wolframwebengine", "examples", "demo", *args)
 
-    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfile, **opts):
+    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfile, client_max_size, **opts):
 
         if demo is None or demo:
             path = self.demo_path(self.demo_choices[demo])
 
         path = os.path.abspath(os.path.expanduser(path))
 
+        client_max_size = int(client_max_size * (1024 ** 2))
+
         try:
             session = create_session(kernel, poolsize=poolsize, initfile=initfile)
 
@@ -103,11 +114,16 @@ def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfi
             self.print("Use --help to display all available options.")
             sys.exit(1)
 
+        loop = asyncio.get_event_loop()
+
         async def main():
 
             view = create_view(session, path, index=index, **opts)
 
-            runner = self.ServerRunner(self.Server(view, access_log_class=self.AccessLogger))
+            def request_factory(*args, **opts):
+                return web.BaseRequest(*args, **opts, client_max_size=client_max_size, loop=loop)
+
+            runner = self.ServerRunner(self.Server(view, access_log_class=self.AccessLogger, request_factory=request_factory))
             await runner.setup()
             await self.TCPSite(runner, domain, port).start()
 
@@ -150,7 +166,6 @@ async def main():
             while True:
                 await asyncio.sleep(3600)
 
-        loop = asyncio.get_event_loop()
         try:
             loop.run_until_complete(main())
         except KeyboardInterrupt:

From cb98441ba8922f90fce47328e1579f94ed4f4eda Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 18 Oct 2021 14:23:21 +0300
Subject: [PATCH 18/23] bumping version

---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 401dd4a..c264779 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def load_tests():
 
 setup(
     name = 'wolframwebengine',
-    version = '1.0.2',
+    version = '1.0.3',
     description = 'A Python library with various tools to start a wolfram engine a server content.',
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',

From 97dcba31eadde87795010d15fe25b41b2dc79ffd Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 18 Oct 2021 14:29:03 +0300
Subject: [PATCH 19/23] automatic code lint

---
 wolframwebengine/cli/commands/runserver.py    | 47 +++++++++++++------
 .../examples/aiohttp_application.py           |  1 +
 wolframwebengine/examples/djangoapp/urls.py   |  1 +
 wolframwebengine/server/app.py                |  1 +
 wolframwebengine/tests/application_aiohttp.py |  1 +
 wolframwebengine/tests/application_django.py  |  1 +
 wolframwebengine/tests/folder_explorer.py     |  1 +
 wolframwebengine/web/__init__.py              |  1 +
 wolframwebengine/web/aiohttp.py               |  1 +
 wolframwebengine/web/django.py                |  1 +
 10 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/wolframwebengine/cli/commands/runserver.py b/wolframwebengine/cli/commands/runserver.py
index d8cedeb..13f4d5c 100644
--- a/wolframwebengine/cli/commands/runserver.py
+++ b/wolframwebengine/cli/commands/runserver.py
@@ -3,7 +3,7 @@
 import logging
 import os
 import sys
-from functools import partial
+
 from aiohttp import web
 from aiohttp.abc import AbstractAccessLogger
 from wolframclient.cli.utils import SimpleCommand
@@ -12,6 +12,7 @@
 from wolframclient.utils.decorators import cached_property, to_dict
 from wolframclient.utils.functional import first
 from wolframclient.utils.importutils import module_path
+
 from wolframwebengine.server.app import create_session, create_view, is_wl_code
 
 
@@ -22,7 +23,6 @@ def log(self, request, response, time):
         )
 
 
-
 class Command(SimpleCommand):
     """ Run test suites from the tests modules.
     A list of patterns can be provided to specify the tests to run.
@@ -47,7 +47,7 @@ def add_arguments(self, parser):
             default=20,
             help="Startup timeout (in seconds) for kernels in the pool.",
             type=int,
-            metavar="SECONDS"
+            metavar="SECONDS",
         )
         parser.add_argument(
             "--cached",
@@ -75,10 +75,10 @@ def add_arguments(self, parser):
 
         parser.add_argument(
             "--client_max_size",
-            default = 10,
-            dest = "client_max_size",
-            help = "Maximum size of client uploads, in Mb",
-            type = float
+            default=10,
+            dest="client_max_size",
+            help="Maximum size of client uploads, in Mb",
+            type=float,
         )
 
     def print_line(self, f="", s=""):
@@ -104,7 +104,21 @@ def demo_choices(self):
     def demo_path(self, *args):
         return module_path("wolframwebengine", "examples", "demo", *args)
 
-    def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfile, startuptimeout, client_max_size, **opts):
+    def handle(
+        self,
+        domain,
+        port,
+        path,
+        kernel,
+        poolsize,
+        lazy,
+        index,
+        demo,
+        initfile,
+        startuptimeout,
+        client_max_size,
+        **opts
+    ):
 
         if demo is None or demo:
             path = self.demo_path(self.demo_choices[demo])
@@ -114,9 +128,8 @@ def handle(self, domain, port, path, kernel, poolsize, lazy, index, demo, initfi
         client_max_size = int(client_max_size * (1024 ** 2))
 
         try:
-            session = create_session(kernel,
-                poolsize=poolsize, initfile=initfile,
-                STARTUP_TIMEOUT=startuptimeout
+            session = create_session(
+                kernel, poolsize=poolsize, initfile=initfile, STARTUP_TIMEOUT=startuptimeout
             )
 
         except WolframKernelException as e:
@@ -131,9 +144,15 @@ async def main():
             view = create_view(session, path, index=index, **opts)
 
             def request_factory(*args, **opts):
-                return web.BaseRequest(*args, **opts, client_max_size=client_max_size, loop=loop)
-
-            runner = self.ServerRunner(self.Server(view, access_log_class=self.AccessLogger, request_factory=request_factory))
+                return web.BaseRequest(
+                    *args, **opts, client_max_size=client_max_size, loop=loop
+                )
+
+            runner = self.ServerRunner(
+                self.Server(
+                    view, access_log_class=self.AccessLogger, request_factory=request_factory
+                )
+            )
             await runner.setup()
             await self.TCPSite(runner, domain, port).start()
 
diff --git a/wolframwebengine/examples/aiohttp_application.py b/wolframwebengine/examples/aiohttp_application.py
index 4c171a8..1e9e9e2 100644
--- a/wolframwebengine/examples/aiohttp_application.py
+++ b/wolframwebengine/examples/aiohttp_application.py
@@ -3,6 +3,7 @@
 from aiohttp import web
 from wolframclient.evaluation import WolframEvaluatorPool
 from wolframclient.language import wl
+
 from wolframwebengine.web import aiohttp_wl_view
 
 session = WolframEvaluatorPool(poolsize=4)
diff --git a/wolframwebengine/examples/djangoapp/urls.py b/wolframwebengine/examples/djangoapp/urls.py
index 5731a99..38fc48d 100644
--- a/wolframwebengine/examples/djangoapp/urls.py
+++ b/wolframwebengine/examples/djangoapp/urls.py
@@ -4,6 +4,7 @@
 from django.urls import path
 from wolframclient.evaluation import WolframLanguageSession
 from wolframclient.language import wl
+
 from wolframwebengine.web import django_wl_view
 
 session = WolframLanguageSession()
diff --git a/wolframwebengine/server/app.py b/wolframwebengine/server/app.py
index b1e5f87..48d8b5d 100644
--- a/wolframwebengine/server/app.py
+++ b/wolframwebengine/server/app.py
@@ -7,6 +7,7 @@
 from wolframclient.evaluation import WolframEvaluatorPool, WolframLanguageAsyncSession
 from wolframclient.language import wl
 from wolframclient.utils.functional import last
+
 from wolframwebengine.server.explorer import get_wl_handler_path_from_folder
 from wolframwebengine.web import aiohttp_wl_view
 
diff --git a/wolframwebengine/tests/application_aiohttp.py b/wolframwebengine/tests/application_aiohttp.py
index 44ad279..2436d9c 100644
--- a/wolframwebengine/tests/application_aiohttp.py
+++ b/wolframwebengine/tests/application_aiohttp.py
@@ -8,6 +8,7 @@
 from wolframclient.language import wl
 from wolframclient.utils.functional import first
 from wolframclient.utils.importutils import module_path
+
 from wolframwebengine.server.app import create_session, create_view
 from wolframwebengine.web import aiohttp_wl_view
 from wolframwebengine.web.utils import auto_wait
diff --git a/wolframwebengine/tests/application_django.py b/wolframwebengine/tests/application_django.py
index 88e1129..2a85cc2 100644
--- a/wolframwebengine/tests/application_django.py
+++ b/wolframwebengine/tests/application_django.py
@@ -5,6 +5,7 @@
 from wolframclient.utils.api import json
 from wolframclient.utils.functional import first
 from wolframclient.utils.tests import TestCase as BaseTestCase
+
 from wolframwebengine.web.utils import auto_wait
 
 
diff --git a/wolframwebengine/tests/folder_explorer.py b/wolframwebengine/tests/folder_explorer.py
index a2f7b41..e01df9a 100644
--- a/wolframwebengine/tests/folder_explorer.py
+++ b/wolframwebengine/tests/folder_explorer.py
@@ -4,6 +4,7 @@
 
 from wolframclient.utils.importutils import module_path
 from wolframclient.utils.tests import TestCase as BaseTestCase
+
 from wolframwebengine.server.explorer import get_wl_handler_path_from_folder
 
 
diff --git a/wolframwebengine/web/__init__.py b/wolframwebengine/web/__init__.py
index 50c15d2..9ac6a47 100644
--- a/wolframwebengine/web/__init__.py
+++ b/wolframwebengine/web/__init__.py
@@ -3,6 +3,7 @@
 from functools import partial
 
 from wolframclient.utils.importutils import API
+
 from wolframwebengine.web.utils import is_coroutine_function
 
 available_backends = API(
diff --git a/wolframwebengine/web/aiohttp.py b/wolframwebengine/web/aiohttp.py
index 0e7dacb..80867d5 100644
--- a/wolframwebengine/web/aiohttp.py
+++ b/wolframwebengine/web/aiohttp.py
@@ -6,6 +6,7 @@
 from wolframclient.utils.api import aiohttp
 from wolframclient.utils.decorators import to_dict
 from wolframclient.utils.encoding import force_text
+
 from wolframwebengine.web.utils import (
     make_generate_httpresponse_expression,
     process_generate_httpresponse_expression,
diff --git a/wolframwebengine/web/django.py b/wolframwebengine/web/django.py
index 62b0b7b..26dae4a 100644
--- a/wolframwebengine/web/django.py
+++ b/wolframwebengine/web/django.py
@@ -7,6 +7,7 @@
 from wolframclient.language import wl
 from wolframclient.utils.decorators import to_dict
 from wolframclient.utils.functional import first, iterate, last
+
 from wolframwebengine.web.utils import (
     auto_wait,
     make_generate_httpresponse_expression,

From 867838dfcfad6d0f4c934fbb69f6e63e5f00ba37 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 18 Oct 2021 14:31:35 +0300
Subject: [PATCH 20/23] adding doc for custom init file

---
 README.md | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/README.md b/README.md
index 853f50a..d91558c 100644
--- a/README.md
+++ b/README.md
@@ -295,6 +295,21 @@ Index           index.wl
 (Press CTRL+C to quit) 
 ```
 
+
+#### --initfile FILE
+
+Allows you to specify a custom init file
+
+```
+>>> python3 -m wolframwebengine --initfile myinit.m
+----------------------------------------------------------------------
+Address         http://localhost:18000/
+Folder          /Users/rdv/Desktop
+Index           index.wl
+----------------------------------------------------------------------
+(Press CTRL+C to quit) 
+```
+
 #### --kernel KERNEL
 
 Allows you to specify the Kernel path

From 0245bcbe97b9321bc3b568deb201d50377c74e76 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 13 Dec 2021 16:51:53 +0100
Subject: [PATCH 21/23] adding documentation for --domain

---
 README.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/README.md b/README.md
index d91558c..f814b7a 100644
--- a/README.md
+++ b/README.md
@@ -295,6 +295,19 @@ Index           index.wl
 (Press CTRL+C to quit) 
 ```
 
+#### --domain DOMAIN
+
+Allows you to specify the DOMAIN of the webserver. By default the webserver only listens to localhost, use `0.0.0.0` to listen on all network interfaces.
+
+```
+>>> python3 -m wolframwebengine --domain 0.0.0.0
+----------------------------------------------------------------------
+Address         http://0.0.0.0:18000/
+Folder          /Users/rdv/Desktop
+Index           index.wl
+----------------------------------------------------------------------
+(Press CTRL+C to quit) 
+```
 
 #### --initfile FILE
 

From 5c8a04ddca3c29f7a79a24f577d879d3fc69e5b3 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Mon, 13 Dec 2021 16:52:34 +0100
Subject: [PATCH 22/23] changing initfile description

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index f814b7a..1d829e7 100644
--- a/README.md
+++ b/README.md
@@ -311,7 +311,7 @@ Index           index.wl
 
 #### --initfile FILE
 
-Allows you to specify a custom init file
+Allows you to specify a custom file containing code to be run when a new kernel is started
 
 ```
 >>> python3 -m wolframwebengine --initfile myinit.m

From d1bdd91d8b754d1996ed8ca1949a2fa889344931 Mon Sep 17 00:00:00 2001
From: Riccardo Di Virgilio <riccardod@wolfram.com>
Date: Tue, 28 Nov 2023 18:31:14 +0100
Subject: [PATCH 23/23] bumping version

---
 CHANGELOG.md | 2 ++
 setup.py     | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index e69de29..632520b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -0,0 +1,2 @@
+# Version 1.0.4
+- fix for https://github.com/WolframResearch/WolframWebEngineForPython/issues/10
diff --git a/setup.py b/setup.py
index c264779..04b89b9 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def load_tests():
 
 setup(
     name = 'wolframwebengine',
-    version = '1.0.3',
+    version = '1.0.4',
     description = 'A Python library with various tools to start a wolfram engine a server content.',
     keywords=['Wolfram Language', 'Wolfram Desktop', 'Mathematica', 'Web Development', 'Wolfram Web Engine'],
     author = 'Wolfram Research, Riccardo Di Virgilio',
@@ -32,7 +32,7 @@ def load_tests():
     python_requires='>=3.5.3',
     include_package_data=True,
     install_requires = [
-        'wolframclient>=1.1.0',
+        'wolframclient>=1.1.10',
         'aiohttp>=3.5.4'
     ],
     project_urls={
