termina 0.0.0__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 (153) hide show
  1. termina-0.0.0/PKG-INFO +87 -0
  2. termina-0.0.0/README.md +60 -0
  3. termina-0.0.0/pyproject.toml +57 -0
  4. termina-0.0.0/src/termina/__init__.py +184 -0
  5. termina-0.0.0/src/termina/auth/__init__.py +2 -0
  6. termina-0.0.0/src/termina/auth/client.py +127 -0
  7. termina-0.0.0/src/termina/base_client.py +242 -0
  8. termina-0.0.0/src/termina/benchmark/__init__.py +21 -0
  9. termina-0.0.0/src/termina/benchmark/client.py +1430 -0
  10. termina-0.0.0/src/termina/benchmark/types/__init__.py +21 -0
  11. termina-0.0.0/src/termina/benchmark/types/benchmark_get_combined_time_series_request_user_type.py +7 -0
  12. termina-0.0.0/src/termina/benchmark/types/benchmark_get_combined_time_series_response_item_value.py +5 -0
  13. termina-0.0.0/src/termina/benchmark/types/benchmark_get_deal_benchmark_quantiles_request_user_type.py +7 -0
  14. termina-0.0.0/src/termina/benchmark/types/benchmark_get_deal_benchmark_quantiles_response_item_value.py +5 -0
  15. termina-0.0.0/src/termina/benchmark/types/benchmark_get_deal_benchmark_tradeoff_at_scale_request_user_type.py +7 -0
  16. termina-0.0.0/src/termina/benchmark/types/benchmark_get_quantiles_request_user_type.py +7 -0
  17. termina-0.0.0/src/termina/benchmark/types/benchmark_get_quantiles_response_item_value.py +5 -0
  18. termina-0.0.0/src/termina/benchmark/types/benchmark_get_scaling_request_user_type.py +7 -0
  19. termina-0.0.0/src/termina/benchmark/types/benchmark_get_time_series_endpoint_request_user_type.py +7 -0
  20. termina-0.0.0/src/termina/benchmark/types/benchmark_get_time_series_endpoint_response_value.py +5 -0
  21. termina-0.0.0/src/termina/benchmark/types/benchmark_get_tradeoff_at_scale_request_user_type.py +7 -0
  22. termina-0.0.0/src/termina/client.py +101 -0
  23. termina-0.0.0/src/termina/company/__init__.py +2 -0
  24. termina-0.0.0/src/termina/company/client.py +719 -0
  25. termina-0.0.0/src/termina/core/__init__.py +30 -0
  26. termina-0.0.0/src/termina/core/api_error.py +15 -0
  27. termina-0.0.0/src/termina/core/client_wrapper.py +79 -0
  28. termina-0.0.0/src/termina/core/datetime_utils.py +28 -0
  29. termina-0.0.0/src/termina/core/file.py +38 -0
  30. termina-0.0.0/src/termina/core/http_client.py +443 -0
  31. termina-0.0.0/src/termina/core/jsonable_encoder.py +99 -0
  32. termina-0.0.0/src/termina/core/oauth_token_provider.py +36 -0
  33. termina-0.0.0/src/termina/core/pydantic_utilities.py +28 -0
  34. termina-0.0.0/src/termina/core/query_encoder.py +33 -0
  35. termina-0.0.0/src/termina/core/remove_none_from_dict.py +11 -0
  36. termina-0.0.0/src/termina/core/request_options.py +32 -0
  37. termina-0.0.0/src/termina/deal/__init__.py +2 -0
  38. termina-0.0.0/src/termina/deal/client.py +947 -0
  39. termina-0.0.0/src/termina/environment.py +7 -0
  40. termina-0.0.0/src/termina/errors/__init__.py +5 -0
  41. termina-0.0.0/src/termina/errors/unprocessable_entity_error.py +9 -0
  42. termina-0.0.0/src/termina/file/__init__.py +2 -0
  43. termina-0.0.0/src/termina/file/client.py +766 -0
  44. termina-0.0.0/src/termina/financials/__init__.py +2 -0
  45. termina-0.0.0/src/termina/financials/client.py +121 -0
  46. termina-0.0.0/src/termina/group/__init__.py +2 -0
  47. termina-0.0.0/src/termina/group/client.py +1020 -0
  48. termina-0.0.0/src/termina/macro/__init__.py +2 -0
  49. termina-0.0.0/src/termina/macro/client.py +506 -0
  50. termina-0.0.0/src/termina/macro/types/__init__.py +5 -0
  51. termina-0.0.0/src/termina/macro/types/segmentation.py +5 -0
  52. termina-0.0.0/src/termina/metadata/__init__.py +2 -0
  53. termina-0.0.0/src/termina/metadata/client.py +111 -0
  54. termina-0.0.0/src/termina/product/__init__.py +2 -0
  55. termina-0.0.0/src/termina/product/client.py +548 -0
  56. termina-0.0.0/src/termina/product/types/__init__.py +5 -0
  57. termina-0.0.0/src/termina/product/types/frequency.py +5 -0
  58. termina-0.0.0/src/termina/py.typed +0 -0
  59. termina-0.0.0/src/termina/types/__init__.py +147 -0
  60. termina-0.0.0/src/termina/types/account_manager_response.py +42 -0
  61. termina-0.0.0/src/termina/types/all_data_metadata_response.py +30 -0
  62. termina-0.0.0/src/termina/types/area.py +42 -0
  63. termina-0.0.0/src/termina/types/area_x_item.py +5 -0
  64. termina-0.0.0/src/termina/types/area_y_item.py +5 -0
  65. termina-0.0.0/src/termina/types/authenticate_api_key_response.py +29 -0
  66. termina-0.0.0/src/termina/types/available_categories_response.py +5 -0
  67. termina-0.0.0/src/termina/types/available_models_response.py +37 -0
  68. termina-0.0.0/src/termina/types/band_response.py +36 -0
  69. termina-0.0.0/src/termina/types/band_response_high_item.py +5 -0
  70. termina-0.0.0/src/termina/types/band_response_low_item.py +5 -0
  71. termina-0.0.0/src/termina/types/band_response_x_item.py +5 -0
  72. termina-0.0.0/src/termina/types/base_null_model.py +27 -0
  73. termina-0.0.0/src/termina/types/benchmark_quantile.py +288 -0
  74. termina-0.0.0/src/termina/types/categories_metadata_response.py +38 -0
  75. termina-0.0.0/src/termina/types/category.py +32 -0
  76. termina-0.0.0/src/termina/types/category_growth_rates.py +84 -0
  77. termina-0.0.0/src/termina/types/category_metadata.py +43 -0
  78. termina-0.0.0/src/termina/types/category_metadata_default_user_type.py +5 -0
  79. termina-0.0.0/src/termina/types/cohorts_response.py +78 -0
  80. termina-0.0.0/src/termina/types/column_metadata.py +59 -0
  81. termina-0.0.0/src/termina/types/column_mini_metadata.py +49 -0
  82. termina-0.0.0/src/termina/types/columns_metadata_response.py +38 -0
  83. termina-0.0.0/src/termina/types/company_response.py +44 -0
  84. termina-0.0.0/src/termina/types/concentration_endpoint_cdf_detail.py +47 -0
  85. termina-0.0.0/src/termina/types/concentration_endpoint_top_users_detail.py +42 -0
  86. termina-0.0.0/src/termina/types/concentration_response.py +53 -0
  87. termina-0.0.0/src/termina/types/concentration_timeseries_detail.py +94 -0
  88. termina-0.0.0/src/termina/types/contribution_response.py +80 -0
  89. termina-0.0.0/src/termina/types/contribution_summary_response.py +113 -0
  90. termina-0.0.0/src/termina/types/create_api_key_response.py +29 -0
  91. termina-0.0.0/src/termina/types/create_file_response.py +42 -0
  92. termina-0.0.0/src/termina/types/deal_combined_metrics_response.py +293 -0
  93. termina-0.0.0/src/termina/types/deal_data_availablity_response.py +54 -0
  94. termina-0.0.0/src/termina/types/deal_with_files_response.py +76 -0
  95. termina-0.0.0/src/termina/types/file_response.py +40 -0
  96. termina-0.0.0/src/termina/types/file_type.py +7 -0
  97. termina-0.0.0/src/termina/types/financial_metrics.py +57 -0
  98. termina-0.0.0/src/termina/types/financials_response.py +51 -0
  99. termina-0.0.0/src/termina/types/freq.py +5 -0
  100. termina-0.0.0/src/termina/types/frequency.py +5 -0
  101. termina-0.0.0/src/termina/types/gcs_signed_url_response.py +32 -0
  102. termina-0.0.0/src/termina/types/group_response.py +57 -0
  103. termina-0.0.0/src/termina/types/group_user.py +45 -0
  104. termina-0.0.0/src/termina/types/group_with_users_response.py +59 -0
  105. termina-0.0.0/src/termina/types/growth_accounting_response.py +135 -0
  106. termina-0.0.0/src/termina/types/healthz_response.py +29 -0
  107. termina-0.0.0/src/termina/types/http_validation_error.py +30 -0
  108. termina-0.0.0/src/termina/types/income_statement_entry.py +47 -0
  109. termina-0.0.0/src/termina/types/list_companies_response.py +33 -0
  110. termina-0.0.0/src/termina/types/list_deals_response.py +33 -0
  111. termina-0.0.0/src/termina/types/list_files_response.py +33 -0
  112. termina-0.0.0/src/termina/types/list_users_response.py +33 -0
  113. termina-0.0.0/src/termina/types/method.py +5 -0
  114. termina-0.0.0/src/termina/types/model_metadata.py +43 -0
  115. termina-0.0.0/src/termina/types/models_metadata_response.py +43 -0
  116. termina-0.0.0/src/termina/types/permission_model.py +37 -0
  117. termina-0.0.0/src/termina/types/priority.py +5 -0
  118. termina-0.0.0/src/termina/types/product_info_response.py +30 -0
  119. termina-0.0.0/src/termina/types/role_response.py +33 -0
  120. termina-0.0.0/src/termina/types/scale.py +42 -0
  121. termina-0.0.0/src/termina/types/scale_model.py +43 -0
  122. termina-0.0.0/src/termina/types/scale_model_response.py +34 -0
  123. termina-0.0.0/src/termina/types/scale_model_response_pred_item_value.py +5 -0
  124. termina-0.0.0/src/termina/types/scale_model_response_raw_data_item_value.py +5 -0
  125. termina-0.0.0/src/termina/types/scale_models_response.py +7 -0
  126. termina-0.0.0/src/termina/types/scaling.py +5 -0
  127. termina-0.0.0/src/termina/types/status.py +7 -0
  128. termina-0.0.0/src/termina/types/tradeoff_model.py +49 -0
  129. termina-0.0.0/src/termina/types/tradeoff_models_response.py +7 -0
  130. termina-0.0.0/src/termina/types/tradeoff_response.py +36 -0
  131. termina-0.0.0/src/termina/types/tradeoff_response_discarded_raw_data_item_value.py +5 -0
  132. termina-0.0.0/src/termina/types/tradeoff_response_raw_data_item_value.py +5 -0
  133. termina-0.0.0/src/termina/types/unit.py +5 -0
  134. termina-0.0.0/src/termina/types/unit_economics_info_response.py +29 -0
  135. termina-0.0.0/src/termina/types/user_accounting_response.py +103 -0
  136. termina-0.0.0/src/termina/types/user_role_response.py +32 -0
  137. termina-0.0.0/src/termina/types/user_type.py +5 -0
  138. termina-0.0.0/src/termina/types/user_with_permissions_response.py +49 -0
  139. termina-0.0.0/src/termina/types/validation_error.py +32 -0
  140. termina-0.0.0/src/termina/types/validation_error_loc_item.py +5 -0
  141. termina-0.0.0/src/termina/types/weather_components.py +57 -0
  142. termina-0.0.0/src/termina/types/weather_data.py +31 -0
  143. termina-0.0.0/src/termina/types/weather_data_keys.py +30 -0
  144. termina-0.0.0/src/termina/types/weather_ecosystems_response.py +30 -0
  145. termina-0.0.0/src/termina/types/weather_gauge.py +42 -0
  146. termina-0.0.0/src/termina/types/weather_market_context.py +57 -0
  147. termina-0.0.0/src/termina/types/weather_metadata.py +58 -0
  148. termina-0.0.0/src/termina/types/weather_metadata_response.py +5 -0
  149. termina-0.0.0/src/termina/unit_economics/__init__.py +2 -0
  150. termina-0.0.0/src/termina/unit_economics/client.py +147 -0
  151. termina-0.0.0/src/termina/user/__init__.py +2 -0
  152. termina-0.0.0/src/termina/user/client.py +233 -0
  153. termina-0.0.0/src/termina/version.py +4 -0
termina-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.1
2
+ Name: termina
3
+ Version: 0.0.0
4
+ Summary:
5
+ Requires-Python: >=3.8,<4.0
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: Operating System :: MacOS
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Operating System :: POSIX
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: Typing :: Typed
21
+ Requires-Dist: httpx (>=0.21.2)
22
+ Requires-Dist: pydantic (>=1.9.2)
23
+ Requires-Dist: pyjwt (==2.8.0)
24
+ Requires-Dist: typing_extensions (>=4.0.0)
25
+ Description-Content-Type: text/markdown
26
+
27
+ <!-- Begin Title, generated by Fern -->
28
+ # Termina Python Library
29
+
30
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
31
+
32
+ The Termina Python Library provides convenient access to the Termina API from applications written in Python.
33
+ <!-- End Title -->
34
+
35
+ <!-- Begin Installation, generated by Fern -->
36
+ # Installation
37
+
38
+ ```sh
39
+ pip install --upgrade termina
40
+ ```
41
+ <!-- End Installation -->
42
+
43
+ <!-- Begin Usage, generated by Fern -->
44
+ # Usage
45
+
46
+ ```python
47
+ from termina.client import Termina
48
+
49
+ client = Termina(
50
+ api_key="YOUR_API_KEY",
51
+ )
52
+ ```
53
+ <!-- End Usage -->
54
+
55
+ <!-- Begin Async Usage, generated by Fern -->
56
+ # Async Client
57
+
58
+ ```python
59
+ from termina.client import AsyncTermina
60
+
61
+ client = AsyncTermina(
62
+ api_key="YOUR_API_KEY",
63
+ )
64
+ ```
65
+ <!-- End Async Usage -->
66
+
67
+ <!-- Begin Status, generated by Fern -->
68
+ # Beta Status
69
+
70
+ This SDK is in beta, and there may be breaking changes between versions without a major
71
+ version update. Therefore, we recommend pinning the package version to a specific version.
72
+ This way, you can install the same version each time without breaking changes.
73
+ <!-- End Status -->
74
+
75
+ <!-- Begin Contributing, generated by Fern -->
76
+ # Contributing
77
+
78
+ While we value open-source contributions to this SDK, this library is generated programmatically.
79
+ Additions made directly to this library would have to be moved over to our generation code,
80
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
81
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
82
+ an issue first to discuss with us!
83
+
84
+ On the other hand, contributions to the README are always very welcome!
85
+ <!-- End Contributing -->
86
+
87
+
@@ -0,0 +1,60 @@
1
+ <!-- Begin Title, generated by Fern -->
2
+ # Termina Python Library
3
+
4
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)
5
+
6
+ The Termina Python Library provides convenient access to the Termina API from applications written in Python.
7
+ <!-- End Title -->
8
+
9
+ <!-- Begin Installation, generated by Fern -->
10
+ # Installation
11
+
12
+ ```sh
13
+ pip install --upgrade termina
14
+ ```
15
+ <!-- End Installation -->
16
+
17
+ <!-- Begin Usage, generated by Fern -->
18
+ # Usage
19
+
20
+ ```python
21
+ from termina.client import Termina
22
+
23
+ client = Termina(
24
+ api_key="YOUR_API_KEY",
25
+ )
26
+ ```
27
+ <!-- End Usage -->
28
+
29
+ <!-- Begin Async Usage, generated by Fern -->
30
+ # Async Client
31
+
32
+ ```python
33
+ from termina.client import AsyncTermina
34
+
35
+ client = AsyncTermina(
36
+ api_key="YOUR_API_KEY",
37
+ )
38
+ ```
39
+ <!-- End Async Usage -->
40
+
41
+ <!-- Begin Status, generated by Fern -->
42
+ # Beta Status
43
+
44
+ This SDK is in beta, and there may be breaking changes between versions without a major
45
+ version update. Therefore, we recommend pinning the package version to a specific version.
46
+ This way, you can install the same version each time without breaking changes.
47
+ <!-- End Status -->
48
+
49
+ <!-- Begin Contributing, generated by Fern -->
50
+ # Contributing
51
+
52
+ While we value open-source contributions to this SDK, this library is generated programmatically.
53
+ Additions made directly to this library would have to be moved over to our generation code,
54
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
55
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
56
+ an issue first to discuss with us!
57
+
58
+ On the other hand, contributions to the README are always very welcome!
59
+ <!-- End Contributing -->
60
+
@@ -0,0 +1,57 @@
1
+ [tool.poetry]
2
+ name = "termina"
3
+ version = "0.0.0"
4
+ description = ""
5
+ readme = "README.md"
6
+ authors = []
7
+ keywords = []
8
+
9
+ classifiers = [
10
+ "Intended Audience :: Developers",
11
+ "Programming Language :: Python",
12
+ "Programming Language :: Python :: 3",
13
+ "Programming Language :: Python :: 3.8",
14
+ "Programming Language :: Python :: 3.9",
15
+ "Programming Language :: Python :: 3.10",
16
+ "Programming Language :: Python :: 3.11",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Operating System :: OS Independent",
19
+ "Operating System :: POSIX",
20
+ "Operating System :: MacOS",
21
+ "Operating System :: POSIX :: Linux",
22
+ "Operating System :: Microsoft :: Windows",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ "Typing :: Typed"
25
+ ]
26
+ packages = [
27
+ { include = "termina", from = "src"}
28
+ ]
29
+
30
+ [project.urls]
31
+ Repository = 'https://github.com/termina-ai/termina-monorepo'
32
+
33
+ [tool.poetry.dependencies]
34
+ python = "^3.8"
35
+ httpx = ">=0.21.2"
36
+ pydantic = ">= 1.9.2"
37
+ pyjwt = "2.8.0"
38
+ typing_extensions = ">= 4.0.0"
39
+
40
+ [tool.poetry.dev-dependencies]
41
+ mypy = "1.0.1"
42
+ pytest = "^7.4.0"
43
+ pytest-asyncio = "^0.23.5"
44
+ python-dateutil = "^2.9.0"
45
+ types-python-dateutil = "^2.9.0.20240316"
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = [ "tests" ]
49
+ asyncio_mode = "auto"
50
+
51
+ [tool.mypy]
52
+ plugins = ["pydantic.mypy"]
53
+
54
+
55
+ [build-system]
56
+ requires = ["poetry-core"]
57
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,184 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import (
4
+ AccountManagerResponse,
5
+ AllDataMetadataResponse,
6
+ Area,
7
+ AuthenticateApiKeyResponse,
8
+ AvailableCategoriesResponse,
9
+ AvailableModelsResponse,
10
+ BandResponse,
11
+ BenchmarkQuantile,
12
+ CategoriesMetadataResponse,
13
+ CategoryGrowthRates,
14
+ CategoryMetadata,
15
+ CategoryMetadataDefaultUserType,
16
+ CohortsResponse,
17
+ ColumnMetadata,
18
+ ColumnMiniMetadata,
19
+ ColumnsMetadataResponse,
20
+ CompanyResponse,
21
+ ConcentrationEndpointCdfDetail,
22
+ ConcentrationEndpointTopUsersDetail,
23
+ ConcentrationResponse,
24
+ ConcentrationTimeseriesDetail,
25
+ ContributionResponse,
26
+ CreateApiKeyResponse,
27
+ CreateFileResponse,
28
+ DealCombinedMetricsResponse,
29
+ DealDataAvailablityResponse,
30
+ DealWithFilesResponse,
31
+ FileResponse,
32
+ FileType,
33
+ FinancialMetrics,
34
+ FinancialsResponse,
35
+ Freq,
36
+ Frequency,
37
+ GcsSignedUrlResponse,
38
+ GroupResponse,
39
+ GroupUser,
40
+ GroupWithUsersResponse,
41
+ GrowthAccountingResponse,
42
+ HealthzResponse,
43
+ HttpValidationError,
44
+ IncomeStatementEntry,
45
+ ListCompaniesResponse,
46
+ ListDealsResponse,
47
+ ListFilesResponse,
48
+ ListUsersResponse,
49
+ ModelMetadata,
50
+ ModelsMetadataResponse,
51
+ PermissionModel,
52
+ Priority,
53
+ ProductInfoResponse,
54
+ RoleResponse,
55
+ Scale,
56
+ ScaleModel,
57
+ ScaleModelsResponse,
58
+ Scaling,
59
+ Status,
60
+ TradeoffModel,
61
+ TradeoffModelsResponse,
62
+ Unit,
63
+ UnitEconomicsInfoResponse,
64
+ UserAccountingResponse,
65
+ UserRoleResponse,
66
+ UserType,
67
+ UserWithPermissionsResponse,
68
+ ValidationError,
69
+ ValidationErrorLocItem,
70
+ WeatherComponents,
71
+ WeatherGauge,
72
+ WeatherMarketContext,
73
+ WeatherMetadata,
74
+ WeatherMetadataResponse,
75
+ )
76
+ from .errors import UnprocessableEntityError
77
+ from . import auth, benchmark, company, deal, file, financials, group, macro, metadata, product, unit_economics, user
78
+ from .benchmark import (
79
+ BenchmarkGetCombinedTimeSeriesRequestUserType,
80
+ BenchmarkGetDealBenchmarkQuantilesRequestUserType,
81
+ BenchmarkGetDealBenchmarkTradeoffAtScaleRequestUserType,
82
+ BenchmarkGetQuantilesRequestUserType,
83
+ BenchmarkGetScalingRequestUserType,
84
+ BenchmarkGetTimeSeriesEndpointRequestUserType,
85
+ BenchmarkGetTradeoffAtScaleRequestUserType,
86
+ )
87
+ from .environment import TerminaEnvironment
88
+ from .version import __version__
89
+
90
+ __all__ = [
91
+ "AccountManagerResponse",
92
+ "AllDataMetadataResponse",
93
+ "Area",
94
+ "AuthenticateApiKeyResponse",
95
+ "AvailableCategoriesResponse",
96
+ "AvailableModelsResponse",
97
+ "BandResponse",
98
+ "BenchmarkGetCombinedTimeSeriesRequestUserType",
99
+ "BenchmarkGetDealBenchmarkQuantilesRequestUserType",
100
+ "BenchmarkGetDealBenchmarkTradeoffAtScaleRequestUserType",
101
+ "BenchmarkGetQuantilesRequestUserType",
102
+ "BenchmarkGetScalingRequestUserType",
103
+ "BenchmarkGetTimeSeriesEndpointRequestUserType",
104
+ "BenchmarkGetTradeoffAtScaleRequestUserType",
105
+ "BenchmarkQuantile",
106
+ "CategoriesMetadataResponse",
107
+ "CategoryGrowthRates",
108
+ "CategoryMetadata",
109
+ "CategoryMetadataDefaultUserType",
110
+ "CohortsResponse",
111
+ "ColumnMetadata",
112
+ "ColumnMiniMetadata",
113
+ "ColumnsMetadataResponse",
114
+ "CompanyResponse",
115
+ "ConcentrationEndpointCdfDetail",
116
+ "ConcentrationEndpointTopUsersDetail",
117
+ "ConcentrationResponse",
118
+ "ConcentrationTimeseriesDetail",
119
+ "ContributionResponse",
120
+ "CreateApiKeyResponse",
121
+ "CreateFileResponse",
122
+ "DealCombinedMetricsResponse",
123
+ "DealDataAvailablityResponse",
124
+ "DealWithFilesResponse",
125
+ "FileResponse",
126
+ "FileType",
127
+ "FinancialMetrics",
128
+ "FinancialsResponse",
129
+ "Freq",
130
+ "Frequency",
131
+ "GcsSignedUrlResponse",
132
+ "GroupResponse",
133
+ "GroupUser",
134
+ "GroupWithUsersResponse",
135
+ "GrowthAccountingResponse",
136
+ "HealthzResponse",
137
+ "HttpValidationError",
138
+ "IncomeStatementEntry",
139
+ "ListCompaniesResponse",
140
+ "ListDealsResponse",
141
+ "ListFilesResponse",
142
+ "ListUsersResponse",
143
+ "ModelMetadata",
144
+ "ModelsMetadataResponse",
145
+ "PermissionModel",
146
+ "Priority",
147
+ "ProductInfoResponse",
148
+ "RoleResponse",
149
+ "Scale",
150
+ "ScaleModel",
151
+ "ScaleModelsResponse",
152
+ "Scaling",
153
+ "Status",
154
+ "TerminaEnvironment",
155
+ "TradeoffModel",
156
+ "TradeoffModelsResponse",
157
+ "Unit",
158
+ "UnitEconomicsInfoResponse",
159
+ "UnprocessableEntityError",
160
+ "UserAccountingResponse",
161
+ "UserRoleResponse",
162
+ "UserType",
163
+ "UserWithPermissionsResponse",
164
+ "ValidationError",
165
+ "ValidationErrorLocItem",
166
+ "WeatherComponents",
167
+ "WeatherGauge",
168
+ "WeatherMarketContext",
169
+ "WeatherMetadata",
170
+ "WeatherMetadataResponse",
171
+ "__version__",
172
+ "auth",
173
+ "benchmark",
174
+ "company",
175
+ "deal",
176
+ "file",
177
+ "financials",
178
+ "group",
179
+ "macro",
180
+ "metadata",
181
+ "product",
182
+ "unit_economics",
183
+ "user",
184
+ ]
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,127 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.pydantic_utilities import pydantic_v1
9
+ from ..core.request_options import RequestOptions
10
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
11
+ from ..types.authenticate_api_key_response import AuthenticateApiKeyResponse
12
+ from ..types.http_validation_error import HttpValidationError
13
+
14
+ # this is used as the default value for optional parameters
15
+ OMIT = typing.cast(typing.Any, ...)
16
+
17
+
18
+ class AuthClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._client_wrapper = client_wrapper
21
+
22
+ def get_token(
23
+ self, *, api_key: str, request_options: typing.Optional[RequestOptions] = None
24
+ ) -> AuthenticateApiKeyResponse:
25
+ """
26
+ Authenticate an API key and return an access token
27
+
28
+ Returns a client JWT for the provided API key, where the JWT contains claims for permissions and access and can be
29
+ refreshed as part of an OAuth flow.
30
+
31
+ Parameters
32
+ ----------
33
+ api_key : str
34
+
35
+ request_options : typing.Optional[RequestOptions]
36
+ Request-specific configuration.
37
+
38
+ Returns
39
+ -------
40
+ AuthenticateApiKeyResponse
41
+ Successful Response
42
+
43
+ Examples
44
+ --------
45
+ from termina.client import Termina
46
+
47
+ client = Termina(
48
+ token="YOUR_TOKEN",
49
+ )
50
+ client.auth.get_token(
51
+ api_key="api_key",
52
+ )
53
+ """
54
+ _response = self._client_wrapper.httpx_client.request(
55
+ "api/v1/auth/get-token",
56
+ method="POST",
57
+ json={"api_key": api_key},
58
+ request_options=request_options,
59
+ omit=OMIT,
60
+ )
61
+ if 200 <= _response.status_code < 300:
62
+ return pydantic_v1.parse_obj_as(AuthenticateApiKeyResponse, _response.json()) # type: ignore
63
+ if _response.status_code == 422:
64
+ raise UnprocessableEntityError(
65
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
66
+ )
67
+ try:
68
+ _response_json = _response.json()
69
+ except JSONDecodeError:
70
+ raise ApiError(status_code=_response.status_code, body=_response.text)
71
+ raise ApiError(status_code=_response.status_code, body=_response_json)
72
+
73
+
74
+ class AsyncAuthClient:
75
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
76
+ self._client_wrapper = client_wrapper
77
+
78
+ async def get_token(
79
+ self, *, api_key: str, request_options: typing.Optional[RequestOptions] = None
80
+ ) -> AuthenticateApiKeyResponse:
81
+ """
82
+ Authenticate an API key and return an access token
83
+
84
+ Returns a client JWT for the provided API key, where the JWT contains claims for permissions and access and can be
85
+ refreshed as part of an OAuth flow.
86
+
87
+ Parameters
88
+ ----------
89
+ api_key : str
90
+
91
+ request_options : typing.Optional[RequestOptions]
92
+ Request-specific configuration.
93
+
94
+ Returns
95
+ -------
96
+ AuthenticateApiKeyResponse
97
+ Successful Response
98
+
99
+ Examples
100
+ --------
101
+ from termina.client import AsyncTermina
102
+
103
+ client = AsyncTermina(
104
+ token="YOUR_TOKEN",
105
+ )
106
+ await client.auth.get_token(
107
+ api_key="api_key",
108
+ )
109
+ """
110
+ _response = await self._client_wrapper.httpx_client.request(
111
+ "api/v1/auth/get-token",
112
+ method="POST",
113
+ json={"api_key": api_key},
114
+ request_options=request_options,
115
+ omit=OMIT,
116
+ )
117
+ if 200 <= _response.status_code < 300:
118
+ return pydantic_v1.parse_obj_as(AuthenticateApiKeyResponse, _response.json()) # type: ignore
119
+ if _response.status_code == 422:
120
+ raise UnprocessableEntityError(
121
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
122
+ )
123
+ try:
124
+ _response_json = _response.json()
125
+ except JSONDecodeError:
126
+ raise ApiError(status_code=_response.status_code, body=_response.text)
127
+ raise ApiError(status_code=_response.status_code, body=_response_json)