polyapi-python 0.3.3.dev6__py3-none-any.whl → 0.3.3.dev8__py3-none-any.whl

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.
polyapi/config.py CHANGED
@@ -55,6 +55,10 @@ def set_api_key_and_url(key: str, url: str):
55
55
  config.set("polyapi", "poly_api_base_url", url)
56
56
  with open(get_config_file_path(), "w") as f:
57
57
  config.write(f)
58
+ global API_KEY
59
+ global API_URL
60
+ API_KEY = key
61
+ API_URL = url
58
62
 
59
63
 
60
64
  def initialize_config(force=False):
@@ -81,7 +85,7 @@ def initialize_config(force=False):
81
85
  sys.exit(1)
82
86
 
83
87
  set_api_key_and_url(key, url)
84
- print_green(f"Poly setup complete.")
88
+ print_green("Poly setup complete.")
85
89
 
86
90
  if not key or not url:
87
91
  print_yellow("Poly API Key and Poly API Base URL are required.")
polyapi/poly_schemas.py CHANGED
@@ -8,6 +8,8 @@ from .typedefs import SchemaSpecDto
8
8
 
9
9
  SCHEMA_CODE_IMPORTS = """from typing_extensions import TypedDict, NotRequired
10
10
 
11
+ __all__ = []
12
+
11
13
 
12
14
  """
13
15
 
@@ -42,7 +44,7 @@ def add_schema_file(
42
44
  # add function to init
43
45
  init_path = os.path.join(full_path, "__init__.py")
44
46
  with open(init_path, "a") as f:
45
- f.write(f"\n\nfrom ._{to_func_namespace(schema_name)} import {schema_name}")
47
+ f.write(f"\n\nfrom ._{to_func_namespace(schema_name)} import {schema_name}\n__all__.append('{schema_name}')\n")
46
48
 
47
49
  # add type_defs to underscore file
48
50
  file_path = os.path.join(full_path, f"_{to_func_namespace(schema_name)}.py")
@@ -75,7 +77,6 @@ def create_schema(
75
77
  add_import_to_init(full_path, next)
76
78
 
77
79
 
78
-
79
80
  def add_schema_to_init(full_path: str, spec: SchemaSpecDto):
80
81
  init_the_init(full_path, code_imports="")
81
82
  init_path = os.path.join(full_path, "__init__.py")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polyapi-python
3
- Version: 0.3.3.dev6
3
+ Version: 0.3.3.dev8
4
4
  Summary: The Python Client for PolyAPI, the IPaaS by Developers for Developers
5
5
  Author-email: Dan Fellin <dan@polyapi.io>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ polyapi/api.py,sha256=f1037HFJF7DtQSSypM4PE5AmmxWxjd0JiW6ARZqrgac,1879
4
4
  polyapi/auth.py,sha256=zrIGatjba5GwUTNjKj1GHQWTEDP9B-HrSzCKbLFoqvc,5336
5
5
  polyapi/cli.py,sha256=AKsWVHZPKGnypOdnzIpoZOsTuwcAuDGQajXhLe9OQKI,8239
6
6
  polyapi/client.py,sha256=CoFDYvyKsqL4wPQbUDIr0Qb8Q5eD92xN4OEEcJEVuGQ,1296
7
- polyapi/config.py,sha256=uvEvOfWYZTLmBmZX-5jJxCzWPpwzVmEOIiQIdi98P4Y,3015
7
+ polyapi/config.py,sha256=Vgc_q9FYXWGCOTr13EbpD0AwHks0Nflimy1NtZxgynA,3088
8
8
  polyapi/constants.py,sha256=sc-FnS0SngBLvSu1ZWMs0UCf9EYD1u1Yhfr-sZXGLns,607
9
9
  polyapi/deployables.py,sha256=WVcNNB6W5ZW_-ukf_kK3moRcnwIkC-O4te6vLepjcco,11936
10
10
  polyapi/error_handler.py,sha256=I_e0iz6VM23FLVQWJljxs2NGcl_OODbi43OcbnqBlp8,2398
@@ -13,7 +13,7 @@ polyapi/execute.py,sha256=kXnvlNQ7nz9cRlV2_5gXH09UCmyiDP5zi3wiAw0uDuk,1943
13
13
  polyapi/function_cli.py,sha256=htgmcx_dPmw4_5NKRgIivcwS7D8bkOsxCTOrJhzV3pU,3989
14
14
  polyapi/generate.py,sha256=IIbU4Kc8Ut-N3cPI1qzgV3M4r_GHi39dgU0ngpUY86Q,10473
15
15
  polyapi/parser.py,sha256=5YWkZX7XT3tR3_qlUmtSNwh6bU6cf2Xly2DclfuKUiE,20376
16
- polyapi/poly_schemas.py,sha256=vHHRUJUycYk4uKmjiWG6fpVQllaRw8yVUt4X_Hmoqk8,2921
16
+ polyapi/poly_schemas.py,sha256=KFVmpB047pWQaTkiCJ3A9sUTNplTS8JETon1Sm2lnQs,2969
17
17
  polyapi/prepare.py,sha256=Q8CWV4kmZ2dbXYVsud34AgJkj5ymcQ_IcYhLuikc9yk,6659
18
18
  polyapi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  polyapi/rendered_spec.py,sha256=uaNzBhP4cX7iGfKwzZv0dxMagWzsGeDr0cQYx_AyIhQ,2153
@@ -24,8 +24,8 @@ polyapi/typedefs.py,sha256=KniVl7vwcDOhgAJmHSgTJKkP0rKWvSLIPOGsWuf9jRU,2239
24
24
  polyapi/utils.py,sha256=9OKwhte_YdnkDectgnjSkVmcxazd8FyfoiKCQtlD63o,10194
25
25
  polyapi/variables.py,sha256=d36-trnfTL_8m2NkorMiImb4O3UrJbiFV38CHxV5i0A,4200
26
26
  polyapi/webhook.py,sha256=LWv28c2MLz_OKBI_Nn7WR4C-gs1SWgbdXsoxIIf-9UI,4886
27
- polyapi_python-0.3.3.dev6.dist-info/licenses/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
28
- polyapi_python-0.3.3.dev6.dist-info/METADATA,sha256=f3rayBkYgsP7MEOkeqSgzLiQ_SdCaDYHRX1Z62UaoUY,5782
29
- polyapi_python-0.3.3.dev6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
30
- polyapi_python-0.3.3.dev6.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
31
- polyapi_python-0.3.3.dev6.dist-info/RECORD,,
27
+ polyapi_python-0.3.3.dev8.dist-info/licenses/LICENSE,sha256=Hi0kDr56Dsy0uYIwNt4r9G7tI8x8miXRTlyvbeplCP8,1068
28
+ polyapi_python-0.3.3.dev8.dist-info/METADATA,sha256=HmGz5_W8LXslbqwmvo3xb3cZRWc9n5aEjPHzCAzuCJk,5782
29
+ polyapi_python-0.3.3.dev8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
30
+ polyapi_python-0.3.3.dev8.dist-info/top_level.txt,sha256=CEFllOnzowci_50RYJac-M54KD2IdAptFsayVVF_f04,8
31
+ polyapi_python-0.3.3.dev8.dist-info/RECORD,,