robosystems-client 0.2.4__py3-none-any.whl → 0.2.6__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.

Potentially problematic release.


This version of robosystems-client might be problematic. Click here for more details.

Files changed (31) hide show
  1. robosystems_client/api/agent/auto_select_agent.py +164 -32
  2. robosystems_client/api/backup/create_backup.py +72 -0
  3. robosystems_client/api/backup/get_backup_download_url.py +12 -28
  4. robosystems_client/api/backup/restore_backup.py +92 -0
  5. robosystems_client/api/graph_limits/get_graph_limits.py +12 -14
  6. robosystems_client/api/graphs/create_graph.py +136 -36
  7. robosystems_client/api/graphs/get_available_graph_tiers.py +279 -0
  8. robosystems_client/api/query/execute_cypher_query.py +13 -11
  9. robosystems_client/models/__init__.py +22 -8
  10. robosystems_client/models/agent_response.py +1 -1
  11. robosystems_client/models/auth_response.py +40 -0
  12. robosystems_client/models/backup_download_url_response.py +92 -0
  13. robosystems_client/models/backup_limits.py +76 -0
  14. robosystems_client/models/batch_agent_request.py +1 -1
  15. robosystems_client/models/batch_agent_response.py +2 -2
  16. robosystems_client/models/copy_operation_limits.py +100 -0
  17. robosystems_client/models/create_graph_request.py +16 -17
  18. robosystems_client/models/credit_limits.py +84 -0
  19. robosystems_client/models/custom_schema_definition.py +14 -10
  20. robosystems_client/models/execute_cypher_query_response_200.py +135 -0
  21. robosystems_client/models/{get_graph_limits_response_getgraphlimits.py → execute_cypher_query_response_200_data_item.py} +5 -5
  22. robosystems_client/models/graph_limits_response.py +174 -0
  23. robosystems_client/models/initial_entity_data.py +15 -12
  24. robosystems_client/models/query_limits.py +84 -0
  25. robosystems_client/models/rate_limits.py +76 -0
  26. robosystems_client/models/storage_limits.py +90 -0
  27. {robosystems_client-0.2.4.dist-info → robosystems_client-0.2.6.dist-info}/METADATA +1 -1
  28. {robosystems_client-0.2.4.dist-info → robosystems_client-0.2.6.dist-info}/RECORD +30 -21
  29. robosystems_client/models/get_backup_download_url_response_getbackupdownloadurl.py +0 -44
  30. {robosystems_client-0.2.4.dist-info → robosystems_client-0.2.6.dist-info}/WHEEL +0 -0
  31. {robosystems_client-0.2.4.dist-info → robosystems_client-0.2.6.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,84 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="CreditLimits")
8
+
9
+
10
+ @_attrs_define
11
+ class CreditLimits:
12
+ """AI credit limits (optional).
13
+
14
+ Attributes:
15
+ monthly_ai_credits (int): Monthly AI credits allocation
16
+ current_balance (int): Current credit balance
17
+ storage_billing_enabled (bool): Whether storage billing is enabled
18
+ storage_rate_per_gb_per_day (int): Storage billing rate per GB per day
19
+ """
20
+
21
+ monthly_ai_credits: int
22
+ current_balance: int
23
+ storage_billing_enabled: bool
24
+ storage_rate_per_gb_per_day: int
25
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> dict[str, Any]:
28
+ monthly_ai_credits = self.monthly_ai_credits
29
+
30
+ current_balance = self.current_balance
31
+
32
+ storage_billing_enabled = self.storage_billing_enabled
33
+
34
+ storage_rate_per_gb_per_day = self.storage_rate_per_gb_per_day
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "monthly_ai_credits": monthly_ai_credits,
41
+ "current_balance": current_balance,
42
+ "storage_billing_enabled": storage_billing_enabled,
43
+ "storage_rate_per_gb_per_day": storage_rate_per_gb_per_day,
44
+ }
45
+ )
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ monthly_ai_credits = d.pop("monthly_ai_credits")
53
+
54
+ current_balance = d.pop("current_balance")
55
+
56
+ storage_billing_enabled = d.pop("storage_billing_enabled")
57
+
58
+ storage_rate_per_gb_per_day = d.pop("storage_rate_per_gb_per_day")
59
+
60
+ credit_limits = cls(
61
+ monthly_ai_credits=monthly_ai_credits,
62
+ current_balance=current_balance,
63
+ storage_billing_enabled=storage_billing_enabled,
64
+ storage_rate_per_gb_per_day=storage_rate_per_gb_per_day,
65
+ )
66
+
67
+ credit_limits.additional_properties = d
68
+ return credit_limits
69
+
70
+ @property
71
+ def additional_keys(self) -> list[str]:
72
+ return list(self.additional_properties.keys())
73
+
74
+ def __getitem__(self, key: str) -> Any:
75
+ return self.additional_properties[key]
76
+
77
+ def __setitem__(self, key: str, value: Any) -> None:
78
+ self.additional_properties[key] = value
79
+
80
+ def __delitem__(self, key: str) -> None:
81
+ del self.additional_properties[key]
82
+
83
+ def __contains__(self, key: str) -> bool:
84
+ return key in self.additional_properties
@@ -21,16 +21,20 @@ T = TypeVar("T", bound="CustomSchemaDefinition")
21
21
 
22
22
  @_attrs_define
23
23
  class CustomSchemaDefinition:
24
- """Custom schema definition for custom graphs.
25
-
26
- Attributes:
27
- name (str): Schema name
28
- version (Union[Unset, str]): Schema version Default: '1.0.0'.
29
- description (Union[None, Unset, str]): Schema description
30
- extends (Union[None, Unset, str]): Base schema to extend (e.g., 'base')
31
- nodes (Union[Unset, list['CustomSchemaDefinitionNodesItem']]): List of node definitions with properties
32
- relationships (Union[Unset, list['CustomSchemaDefinitionRelationshipsItem']]): List of relationship definitions
33
- metadata (Union[Unset, CustomSchemaDefinitionMetadata]): Additional schema metadata
24
+ """Custom schema definition for generic graphs.
25
+
26
+ This model allows you to define custom node types, relationship types, and properties
27
+ for graphs that don't fit the standard entity-based schema. Perfect for domain-specific
28
+ applications like inventory systems, org charts, project management, etc.
29
+
30
+ Attributes:
31
+ name (str): Schema name
32
+ version (Union[Unset, str]): Schema version Default: '1.0.0'.
33
+ description (Union[None, Unset, str]): Schema description
34
+ extends (Union[None, Unset, str]): Base schema to extend (e.g., 'base' for common utilities)
35
+ nodes (Union[Unset, list['CustomSchemaDefinitionNodesItem']]): List of node definitions with properties
36
+ relationships (Union[Unset, list['CustomSchemaDefinitionRelationshipsItem']]): List of relationship definitions
37
+ metadata (Union[Unset, CustomSchemaDefinitionMetadata]): Additional schema metadata
34
38
  """
35
39
 
36
40
  name: str
@@ -0,0 +1,135 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.execute_cypher_query_response_200_data_item import (
11
+ ExecuteCypherQueryResponse200DataItem,
12
+ )
13
+
14
+
15
+ T = TypeVar("T", bound="ExecuteCypherQueryResponse200")
16
+
17
+
18
+ @_attrs_define
19
+ class ExecuteCypherQueryResponse200:
20
+ """
21
+ Attributes:
22
+ success (Union[Unset, bool]):
23
+ data (Union[Unset, list['ExecuteCypherQueryResponse200DataItem']]):
24
+ columns (Union[Unset, list[str]]):
25
+ row_count (Union[Unset, int]):
26
+ execution_time_ms (Union[Unset, float]):
27
+ graph_id (Union[Unset, str]):
28
+ timestamp (Union[Unset, str]):
29
+ """
30
+
31
+ success: Union[Unset, bool] = UNSET
32
+ data: Union[Unset, list["ExecuteCypherQueryResponse200DataItem"]] = UNSET
33
+ columns: Union[Unset, list[str]] = UNSET
34
+ row_count: Union[Unset, int] = UNSET
35
+ execution_time_ms: Union[Unset, float] = UNSET
36
+ graph_id: Union[Unset, str] = UNSET
37
+ timestamp: Union[Unset, str] = UNSET
38
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
+
40
+ def to_dict(self) -> dict[str, Any]:
41
+ success = self.success
42
+
43
+ data: Union[Unset, list[dict[str, Any]]] = UNSET
44
+ if not isinstance(self.data, Unset):
45
+ data = []
46
+ for data_item_data in self.data:
47
+ data_item = data_item_data.to_dict()
48
+ data.append(data_item)
49
+
50
+ columns: Union[Unset, list[str]] = UNSET
51
+ if not isinstance(self.columns, Unset):
52
+ columns = self.columns
53
+
54
+ row_count = self.row_count
55
+
56
+ execution_time_ms = self.execution_time_ms
57
+
58
+ graph_id = self.graph_id
59
+
60
+ timestamp = self.timestamp
61
+
62
+ field_dict: dict[str, Any] = {}
63
+ field_dict.update(self.additional_properties)
64
+ field_dict.update({})
65
+ if success is not UNSET:
66
+ field_dict["success"] = success
67
+ if data is not UNSET:
68
+ field_dict["data"] = data
69
+ if columns is not UNSET:
70
+ field_dict["columns"] = columns
71
+ if row_count is not UNSET:
72
+ field_dict["row_count"] = row_count
73
+ if execution_time_ms is not UNSET:
74
+ field_dict["execution_time_ms"] = execution_time_ms
75
+ if graph_id is not UNSET:
76
+ field_dict["graph_id"] = graph_id
77
+ if timestamp is not UNSET:
78
+ field_dict["timestamp"] = timestamp
79
+
80
+ return field_dict
81
+
82
+ @classmethod
83
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
84
+ from ..models.execute_cypher_query_response_200_data_item import (
85
+ ExecuteCypherQueryResponse200DataItem,
86
+ )
87
+
88
+ d = dict(src_dict)
89
+ success = d.pop("success", UNSET)
90
+
91
+ data = []
92
+ _data = d.pop("data", UNSET)
93
+ for data_item_data in _data or []:
94
+ data_item = ExecuteCypherQueryResponse200DataItem.from_dict(data_item_data)
95
+
96
+ data.append(data_item)
97
+
98
+ columns = cast(list[str], d.pop("columns", UNSET))
99
+
100
+ row_count = d.pop("row_count", UNSET)
101
+
102
+ execution_time_ms = d.pop("execution_time_ms", UNSET)
103
+
104
+ graph_id = d.pop("graph_id", UNSET)
105
+
106
+ timestamp = d.pop("timestamp", UNSET)
107
+
108
+ execute_cypher_query_response_200 = cls(
109
+ success=success,
110
+ data=data,
111
+ columns=columns,
112
+ row_count=row_count,
113
+ execution_time_ms=execution_time_ms,
114
+ graph_id=graph_id,
115
+ timestamp=timestamp,
116
+ )
117
+
118
+ execute_cypher_query_response_200.additional_properties = d
119
+ return execute_cypher_query_response_200
120
+
121
+ @property
122
+ def additional_keys(self) -> list[str]:
123
+ return list(self.additional_properties.keys())
124
+
125
+ def __getitem__(self, key: str) -> Any:
126
+ return self.additional_properties[key]
127
+
128
+ def __setitem__(self, key: str, value: Any) -> None:
129
+ self.additional_properties[key] = value
130
+
131
+ def __delitem__(self, key: str) -> None:
132
+ del self.additional_properties[key]
133
+
134
+ def __contains__(self, key: str) -> bool:
135
+ return key in self.additional_properties
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
- T = TypeVar("T", bound="GetGraphLimitsResponseGetgraphlimits")
7
+ T = TypeVar("T", bound="ExecuteCypherQueryResponse200DataItem")
8
8
 
9
9
 
10
10
  @_attrs_define
11
- class GetGraphLimitsResponseGetgraphlimits:
11
+ class ExecuteCypherQueryResponse200DataItem:
12
12
  """ """
13
13
 
14
14
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -22,10 +22,10 @@ class GetGraphLimitsResponseGetgraphlimits:
22
22
  @classmethod
23
23
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
24
  d = dict(src_dict)
25
- get_graph_limits_response_getgraphlimits = cls()
25
+ execute_cypher_query_response_200_data_item = cls()
26
26
 
27
- get_graph_limits_response_getgraphlimits.additional_properties = d
28
- return get_graph_limits_response_getgraphlimits
27
+ execute_cypher_query_response_200_data_item.additional_properties = d
28
+ return execute_cypher_query_response_200_data_item
29
29
 
30
30
  @property
31
31
  def additional_keys(self) -> list[str]:
@@ -0,0 +1,174 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ if TYPE_CHECKING:
10
+ from ..models.backup_limits import BackupLimits
11
+ from ..models.copy_operation_limits import CopyOperationLimits
12
+ from ..models.credit_limits import CreditLimits
13
+ from ..models.query_limits import QueryLimits
14
+ from ..models.rate_limits import RateLimits
15
+ from ..models.storage_limits import StorageLimits
16
+
17
+
18
+ T = TypeVar("T", bound="GraphLimitsResponse")
19
+
20
+
21
+ @_attrs_define
22
+ class GraphLimitsResponse:
23
+ """Response model for comprehensive graph operational limits.
24
+
25
+ Attributes:
26
+ graph_id (str): Graph database identifier
27
+ subscription_tier (str): User's subscription tier
28
+ graph_tier (str): Graph's database tier
29
+ is_shared_repository (bool): Whether this is a shared repository
30
+ storage (StorageLimits): Storage limits information.
31
+ queries (QueryLimits): Query operation limits.
32
+ copy_operations (CopyOperationLimits): Copy/ingestion operation limits.
33
+ backups (BackupLimits): Backup operation limits.
34
+ rate_limits (RateLimits): API rate limits.
35
+ credits_ (Union['CreditLimits', None, Unset]): AI credit limits (if applicable)
36
+ """
37
+
38
+ graph_id: str
39
+ subscription_tier: str
40
+ graph_tier: str
41
+ is_shared_repository: bool
42
+ storage: "StorageLimits"
43
+ queries: "QueryLimits"
44
+ copy_operations: "CopyOperationLimits"
45
+ backups: "BackupLimits"
46
+ rate_limits: "RateLimits"
47
+ credits_: Union["CreditLimits", None, Unset] = UNSET
48
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
49
+
50
+ def to_dict(self) -> dict[str, Any]:
51
+ from ..models.credit_limits import CreditLimits
52
+
53
+ graph_id = self.graph_id
54
+
55
+ subscription_tier = self.subscription_tier
56
+
57
+ graph_tier = self.graph_tier
58
+
59
+ is_shared_repository = self.is_shared_repository
60
+
61
+ storage = self.storage.to_dict()
62
+
63
+ queries = self.queries.to_dict()
64
+
65
+ copy_operations = self.copy_operations.to_dict()
66
+
67
+ backups = self.backups.to_dict()
68
+
69
+ rate_limits = self.rate_limits.to_dict()
70
+
71
+ credits_: Union[None, Unset, dict[str, Any]]
72
+ if isinstance(self.credits_, Unset):
73
+ credits_ = UNSET
74
+ elif isinstance(self.credits_, CreditLimits):
75
+ credits_ = self.credits_.to_dict()
76
+ else:
77
+ credits_ = self.credits_
78
+
79
+ field_dict: dict[str, Any] = {}
80
+ field_dict.update(self.additional_properties)
81
+ field_dict.update(
82
+ {
83
+ "graph_id": graph_id,
84
+ "subscription_tier": subscription_tier,
85
+ "graph_tier": graph_tier,
86
+ "is_shared_repository": is_shared_repository,
87
+ "storage": storage,
88
+ "queries": queries,
89
+ "copy_operations": copy_operations,
90
+ "backups": backups,
91
+ "rate_limits": rate_limits,
92
+ }
93
+ )
94
+ if credits_ is not UNSET:
95
+ field_dict["credits"] = credits_
96
+
97
+ return field_dict
98
+
99
+ @classmethod
100
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
101
+ from ..models.backup_limits import BackupLimits
102
+ from ..models.copy_operation_limits import CopyOperationLimits
103
+ from ..models.credit_limits import CreditLimits
104
+ from ..models.query_limits import QueryLimits
105
+ from ..models.rate_limits import RateLimits
106
+ from ..models.storage_limits import StorageLimits
107
+
108
+ d = dict(src_dict)
109
+ graph_id = d.pop("graph_id")
110
+
111
+ subscription_tier = d.pop("subscription_tier")
112
+
113
+ graph_tier = d.pop("graph_tier")
114
+
115
+ is_shared_repository = d.pop("is_shared_repository")
116
+
117
+ storage = StorageLimits.from_dict(d.pop("storage"))
118
+
119
+ queries = QueryLimits.from_dict(d.pop("queries"))
120
+
121
+ copy_operations = CopyOperationLimits.from_dict(d.pop("copy_operations"))
122
+
123
+ backups = BackupLimits.from_dict(d.pop("backups"))
124
+
125
+ rate_limits = RateLimits.from_dict(d.pop("rate_limits"))
126
+
127
+ def _parse_credits_(data: object) -> Union["CreditLimits", None, Unset]:
128
+ if data is None:
129
+ return data
130
+ if isinstance(data, Unset):
131
+ return data
132
+ try:
133
+ if not isinstance(data, dict):
134
+ raise TypeError()
135
+ credits_type_0 = CreditLimits.from_dict(data)
136
+
137
+ return credits_type_0
138
+ except: # noqa: E722
139
+ pass
140
+ return cast(Union["CreditLimits", None, Unset], data)
141
+
142
+ credits_ = _parse_credits_(d.pop("credits", UNSET))
143
+
144
+ graph_limits_response = cls(
145
+ graph_id=graph_id,
146
+ subscription_tier=subscription_tier,
147
+ graph_tier=graph_tier,
148
+ is_shared_repository=is_shared_repository,
149
+ storage=storage,
150
+ queries=queries,
151
+ copy_operations=copy_operations,
152
+ backups=backups,
153
+ rate_limits=rate_limits,
154
+ credits_=credits_,
155
+ )
156
+
157
+ graph_limits_response.additional_properties = d
158
+ return graph_limits_response
159
+
160
+ @property
161
+ def additional_keys(self) -> list[str]:
162
+ return list(self.additional_properties.keys())
163
+
164
+ def __getitem__(self, key: str) -> Any:
165
+ return self.additional_properties[key]
166
+
167
+ def __setitem__(self, key: str, value: Any) -> None:
168
+ self.additional_properties[key] = value
169
+
170
+ def __delitem__(self, key: str) -> None:
171
+ del self.additional_properties[key]
172
+
173
+ def __contains__(self, key: str) -> bool:
174
+ return key in self.additional_properties
@@ -11,18 +11,21 @@ T = TypeVar("T", bound="InitialEntityData")
11
11
 
12
12
  @_attrs_define
13
13
  class InitialEntityData:
14
- """Initial entity data for graph creation.
15
-
16
- Attributes:
17
- name (str): Entity name
18
- uri (str): Entity website or URI
19
- cik (Union[None, Unset, str]): CIK number for SEC filings
20
- sic (Union[None, Unset, str]): SIC code
21
- sic_description (Union[None, Unset, str]): SIC description
22
- category (Union[None, Unset, str]): Business category
23
- state_of_incorporation (Union[None, Unset, str]): State of incorporation
24
- fiscal_year_end (Union[None, Unset, str]): Fiscal year end (MMDD)
25
- ein (Union[None, Unset, str]): Employer Identification Number
14
+ """Initial entity data for entity-focused graph creation.
15
+
16
+ When creating an entity graph with an initial entity node, this model defines
17
+ the entity's identifying information and metadata.
18
+
19
+ Attributes:
20
+ name (str): Entity name
21
+ uri (str): Entity website or URI
22
+ cik (Union[None, Unset, str]): CIK number for SEC filings
23
+ sic (Union[None, Unset, str]): SIC code
24
+ sic_description (Union[None, Unset, str]): SIC description
25
+ category (Union[None, Unset, str]): Business category
26
+ state_of_incorporation (Union[None, Unset, str]): State of incorporation
27
+ fiscal_year_end (Union[None, Unset, str]): Fiscal year end (MMDD)
28
+ ein (Union[None, Unset, str]): Employer Identification Number
26
29
  """
27
30
 
28
31
  name: str
@@ -0,0 +1,84 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="QueryLimits")
8
+
9
+
10
+ @_attrs_define
11
+ class QueryLimits:
12
+ """Query operation limits.
13
+
14
+ Attributes:
15
+ max_timeout_seconds (int): Maximum query timeout in seconds
16
+ chunk_size (int): Maximum chunk size for result streaming
17
+ max_rows_per_query (int): Maximum rows returned per query
18
+ concurrent_queries (int): Maximum concurrent queries allowed
19
+ """
20
+
21
+ max_timeout_seconds: int
22
+ chunk_size: int
23
+ max_rows_per_query: int
24
+ concurrent_queries: int
25
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
+
27
+ def to_dict(self) -> dict[str, Any]:
28
+ max_timeout_seconds = self.max_timeout_seconds
29
+
30
+ chunk_size = self.chunk_size
31
+
32
+ max_rows_per_query = self.max_rows_per_query
33
+
34
+ concurrent_queries = self.concurrent_queries
35
+
36
+ field_dict: dict[str, Any] = {}
37
+ field_dict.update(self.additional_properties)
38
+ field_dict.update(
39
+ {
40
+ "max_timeout_seconds": max_timeout_seconds,
41
+ "chunk_size": chunk_size,
42
+ "max_rows_per_query": max_rows_per_query,
43
+ "concurrent_queries": concurrent_queries,
44
+ }
45
+ )
46
+
47
+ return field_dict
48
+
49
+ @classmethod
50
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
51
+ d = dict(src_dict)
52
+ max_timeout_seconds = d.pop("max_timeout_seconds")
53
+
54
+ chunk_size = d.pop("chunk_size")
55
+
56
+ max_rows_per_query = d.pop("max_rows_per_query")
57
+
58
+ concurrent_queries = d.pop("concurrent_queries")
59
+
60
+ query_limits = cls(
61
+ max_timeout_seconds=max_timeout_seconds,
62
+ chunk_size=chunk_size,
63
+ max_rows_per_query=max_rows_per_query,
64
+ concurrent_queries=concurrent_queries,
65
+ )
66
+
67
+ query_limits.additional_properties = d
68
+ return query_limits
69
+
70
+ @property
71
+ def additional_keys(self) -> list[str]:
72
+ return list(self.additional_properties.keys())
73
+
74
+ def __getitem__(self, key: str) -> Any:
75
+ return self.additional_properties[key]
76
+
77
+ def __setitem__(self, key: str, value: Any) -> None:
78
+ self.additional_properties[key] = value
79
+
80
+ def __delitem__(self, key: str) -> None:
81
+ del self.additional_properties[key]
82
+
83
+ def __contains__(self, key: str) -> bool:
84
+ return key in self.additional_properties
@@ -0,0 +1,76 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ T = TypeVar("T", bound="RateLimits")
8
+
9
+
10
+ @_attrs_define
11
+ class RateLimits:
12
+ """API rate limits.
13
+
14
+ Attributes:
15
+ requests_per_minute (int): Requests per minute limit
16
+ requests_per_hour (int): Requests per hour limit
17
+ burst_capacity (int): Burst capacity for short spikes
18
+ """
19
+
20
+ requests_per_minute: int
21
+ requests_per_hour: int
22
+ burst_capacity: int
23
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
24
+
25
+ def to_dict(self) -> dict[str, Any]:
26
+ requests_per_minute = self.requests_per_minute
27
+
28
+ requests_per_hour = self.requests_per_hour
29
+
30
+ burst_capacity = self.burst_capacity
31
+
32
+ field_dict: dict[str, Any] = {}
33
+ field_dict.update(self.additional_properties)
34
+ field_dict.update(
35
+ {
36
+ "requests_per_minute": requests_per_minute,
37
+ "requests_per_hour": requests_per_hour,
38
+ "burst_capacity": burst_capacity,
39
+ }
40
+ )
41
+
42
+ return field_dict
43
+
44
+ @classmethod
45
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
46
+ d = dict(src_dict)
47
+ requests_per_minute = d.pop("requests_per_minute")
48
+
49
+ requests_per_hour = d.pop("requests_per_hour")
50
+
51
+ burst_capacity = d.pop("burst_capacity")
52
+
53
+ rate_limits = cls(
54
+ requests_per_minute=requests_per_minute,
55
+ requests_per_hour=requests_per_hour,
56
+ burst_capacity=burst_capacity,
57
+ )
58
+
59
+ rate_limits.additional_properties = d
60
+ return rate_limits
61
+
62
+ @property
63
+ def additional_keys(self) -> list[str]:
64
+ return list(self.additional_properties.keys())
65
+
66
+ def __getitem__(self, key: str) -> Any:
67
+ return self.additional_properties[key]
68
+
69
+ def __setitem__(self, key: str, value: Any) -> None:
70
+ self.additional_properties[key] = value
71
+
72
+ def __delitem__(self, key: str) -> None:
73
+ del self.additional_properties[key]
74
+
75
+ def __contains__(self, key: str) -> bool:
76
+ return key in self.additional_properties