diff --git a/samples/instructions/installation_notes.md b/samples/instructions/installation_notes.md index b2857ad..dad79d2 100644 --- a/samples/instructions/installation_notes.md +++ b/samples/instructions/installation_notes.md @@ -156,7 +156,7 @@ pip install --upgrade twine Now that we have everything installed, we can build or distribution package. To build our distribution pacakge run the following command: ```console -setup.py sdist bdist_wheel +python setup.py sdist bdist_wheel ``` This will generate a distrubtion archives in the _dist_ folder. In fact, if you look in your directory you should see a few new folders one called _dist_ and one called _build_. These were generated when we ran the command. diff --git a/setup.py b/setup.py index 8e093a5..008ea2d 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ # I'm in alpha development still, so a compliant version number is a1. # read this as MAJOR VERSION 0, MINOR VERSION 1, MAINTENANCE VERSION 0 - version='0.2.6', + version='0.2.8', # here is a simple description of the library, this will appear when # someone searches for the library on https://pypi.org/search @@ -46,7 +46,13 @@ keywords='finance, td ameritrade, api', # here are the packages I want "build." - packages=find_packages(include=['td', 'samples']), + packages=find_packages(include=['td', 'samples', 'td.app','td.templates']), + + # here we specify any package data. + package_data={ + # And include any files found subdirectory of the "td" package. + "td": ["app/*", "templates/*"], + }, # I also have some package data, like photos and JSON files, so I want to # include those too. diff --git a/td/stream.py b/td/stream.py index 7d0fb27..b68737a 100644 --- a/td/stream.py +++ b/td/stream.py @@ -630,8 +630,10 @@ async def _connect(self, pipeline_start: bool = True) -> websockets.WebSocketCli return self.connection else: + # Login to the stream. await self._send_message(login_request) + await self._receive_message(return_value=False) return self.connection @@ -703,7 +705,6 @@ async def _receive_message(self, return_value: bool = False) -> dict: await self._write_to_csv(data = message_decoded) except: print('Could not write content to CSV file, closing stream') - # await asyncio.get_running_loop().stop() await self.close_stream() break