quantplay 2.0.33__tar.gz → 2.0.34__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {quantplay-2.0.33 → quantplay-2.0.34}/PKG-INFO +1 -1
  2. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/angelone.py +10 -4
  3. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts.py +0 -5
  4. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/Connect.py +4 -5
  5. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/PKG-INFO +1 -1
  6. {quantplay-2.0.33 → quantplay-2.0.34}/setup.py +1 -1
  7. {quantplay-2.0.33 → quantplay-2.0.34}/README.md +0 -0
  8. {quantplay-2.0.33 → quantplay-2.0.34}/pyproject.toml +0 -0
  9. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/__init__.py +0 -0
  10. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/__init__.py +0 -0
  11. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/aliceblue.py +0 -0
  12. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/auto_login/__init__.py +0 -0
  13. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/auto_login/aliceblue.py +0 -0
  14. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/finvasia_utils/__init__.py +0 -0
  15. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
  16. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/five_paisa.py +0 -0
  17. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/flattrade.py +0 -0
  18. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/__init__.py +0 -0
  19. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
  20. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/ft_utils/ft_noren.py +0 -0
  21. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/generics/__init__.py +0 -0
  22. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/generics/broker.py +0 -0
  23. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/iifl_xts.py +0 -0
  24. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/kite_utils.py +0 -0
  25. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/motilal.py +0 -0
  26. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/noren.py +0 -0
  27. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/shoonya.py +0 -0
  28. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/uplink/__init__.py +0 -0
  29. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/uplink/uplink_utils.py +0 -0
  30. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/upstox.py +0 -0
  31. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/Exception.py +0 -0
  32. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
  33. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/xts_utils/__init__.py +0 -0
  34. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/broker/zerodha.py +0 -0
  35. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/exception/__init__.py +0 -0
  36. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/exception/exceptions.py +0 -0
  37. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/__init__.py +0 -0
  38. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/broker.py +0 -0
  39. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/generics.py +0 -0
  40. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/instrument_data.py +0 -0
  41. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/model/order_event.py +0 -0
  42. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/py.typed +0 -0
  43. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/__init__.py +0 -0
  44. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/constant.py +0 -0
  45. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/exchange.py +0 -0
  46. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/number_utils.py +0 -0
  47. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/pickle_utils.py +0 -0
  48. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/utils/selenium_utils.py +0 -0
  49. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/__init__.py +0 -0
  50. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/aws/__init__.py +0 -0
  51. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay/wrapper/aws/s3.py +0 -0
  52. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/SOURCES.txt +0 -0
  53. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/dependency_links.txt +0 -0
  54. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/requires.txt +0 -0
  55. {quantplay-2.0.33 → quantplay-2.0.34}/quantplay.egg-info/top_level.txt +0 -0
  56. {quantplay-2.0.33 → quantplay-2.0.34}/setup.cfg +0 -0
  57. {quantplay-2.0.33 → quantplay-2.0.34}/tests/__init__.py +0 -0
  58. {quantplay-2.0.33 → quantplay-2.0.34}/tests/conftest.py +0 -0
  59. {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/__init__.py +0 -0
  60. {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/aws/__init__.py +0 -0
  61. {quantplay-2.0.33 → quantplay-2.0.34}/tests/wrapper/aws/s3_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quantplay
3
- Version: 2.0.33
3
+ Version: 2.0.34
4
4
  Summary: This python package will be stored in AWS CodeArtifact
5
5
  Home-page:
6
6
  Author:
@@ -568,17 +568,23 @@ class AngelOne(Broker):
568
568
  response = fn(*args, **kwargs)
569
569
  if "errorCode" in response and response["errorCode"] == "AG8001":
570
570
  raise TokenException(f"{self.user_id}: Invalid Token")
571
- if isinstance(response, bytes):
571
+
572
+ elif isinstance(response, bytes):
572
573
  raise InvalidArgumentException(
573
574
  "Invalid data response. AngelOne sent incorrect data, Please check."
574
575
  )
575
576
 
576
577
  return response
578
+
577
579
  except (TokenException, InvalidArgumentException):
578
580
  raise
581
+
579
582
  except DataException as e:
580
- # TODO: Catch and Check for Others Exceptions
583
+ if "Access denied because of exceeding access rate" in str(e):
584
+ raise RetryableException(str(e))
585
+
581
586
  raise BrokerException(str(e))
582
- except Exception:
587
+
588
+ except Exception as e:
583
589
  traceback.print_exc()
584
- raise RetryableException("Failed to fetch user profile")
590
+ raise RetryableException(str(e))
@@ -8,9 +8,7 @@ from typing import Dict
8
8
 
9
9
  import pandas as pd
10
10
  import polars as pl
11
- import requests
12
11
  from retrying import retry # type: ignore
13
- from urllib3.exceptions import InsecureRequestWarning
14
12
 
15
13
  from quantplay.broker.generics.broker import Broker
16
14
  from quantplay.broker.xts_utils.Connect import XTSConnect
@@ -32,9 +30,6 @@ from quantplay.model.order_event import OrderUpdateEvent
32
30
  from quantplay.utils.constant import Constants, OrderType
33
31
  from quantplay.utils.pickle_utils import InstrumentData, PickleUtils
34
32
 
35
- # -# Suppress only the single warning from urllib3 needed.
36
- requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) # type: ignore
37
-
38
33
 
39
34
  class XTS(Broker):
40
35
  source = "WebAPI"
@@ -3,8 +3,6 @@ Connect.py
3
3
 
4
4
  API wrapper for XTS Connect REST APIs.
5
5
 
6
- :copyright:
7
- :license: see LICENSE for details.
8
6
  """
9
7
 
10
8
  import json
@@ -14,6 +12,7 @@ import traceback
14
12
  from typing import Any, Dict, Literal
15
13
 
16
14
  import requests
15
+ import urllib3
17
16
  import requests.adapters
18
17
 
19
18
  from six.moves.urllib.parse import urljoin # type:ignore
@@ -24,6 +23,9 @@ from quantplay.exception.exceptions import BrokerException
24
23
 
25
24
  log = logging.getLogger(__name__)
26
25
 
26
+ # Disable requests SSL warning
27
+ urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
28
+
27
29
 
28
30
  class XTSCommon:
29
31
  """
@@ -192,9 +194,6 @@ class XTSConnect(XTSCommon):
192
194
  else:
193
195
  self.reqsession = requests
194
196
 
195
- # disable requests SSL warning
196
- requests.packages.urllib3.disable_warnings() # type:ignore
197
-
198
197
  def _set_common_variables(
199
198
  self, access_token: str, userID: str, isInvestorClient: bool
200
199
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quantplay
3
- Version: 2.0.33
3
+ Version: 2.0.34
4
4
  Summary: This python package will be stored in AWS CodeArtifact
5
5
  Home-page:
6
6
  Author:
@@ -21,7 +21,7 @@ requirements = [
21
21
  setup(
22
22
  name="quantplay",
23
23
  long_description=Path("README.md").read_text(),
24
- version="2.0.33",
24
+ version="2.0.34",
25
25
  setup_requires=["pytest-runner"],
26
26
  install_requires=requirements,
27
27
  tests_require=[],
File without changes
File without changes
File without changes
File without changes
File without changes