psr-factory 4.1.0b1__py3-none-win_amd64.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.
@@ -0,0 +1,357 @@
1
+ # PSR Factory. Copyright (C) PSR, Inc - All Rights Reserved
2
+ # Unauthorized copying of this file, via any medium is strictly prohibited
3
+ # Proprietary and confidential
4
+
5
+ import ctypes
6
+ import os
7
+ import sys
8
+
9
+ import psr.psrfcommon
10
+
11
+
12
+ lib = None
13
+
14
+ if sys.platform == "win32":
15
+ def load_lib():
16
+ lib_path = os.path.join(os.path.dirname(__file__), "factory.dll")
17
+ return ctypes.cdll.LoadLibrary(lib_path)
18
+ else:
19
+ def load_lib():
20
+ with psr.psrfcommon.change_cwd(os.path.dirname(__file__)):
21
+ lib_path = "./libfactory.so"
22
+ return ctypes.cdll.LoadLibrary(lib_path)
23
+
24
+
25
+ def initialize():
26
+ global lib
27
+ lib = load_lib()
28
+
29
+ lib.psrd_initialize.restype = ctypes.c_int
30
+ lib.psrd_initialize.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
31
+ lib.psrd_unload.restype = ctypes.c_int
32
+ lib.psrd_unload.argtypes = [ctypes.c_void_p]
33
+ lib.psrd_set_global_setting.restype = ctypes.c_int
34
+ lib.psrd_set_global_setting.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
35
+ lib.psrd_get_global_setting.restype = ctypes.c_int
36
+ lib.psrd_get_global_setting.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
37
+ lib.psrd_set_binding_property.restype = ctypes.c_int
38
+ lib.psrd_set_binding_property.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
39
+ lib.psrd_version_short.restype = ctypes.c_int
40
+ lib.psrd_version_short.argtypes = [ctypes.c_char_p, ctypes.c_long]
41
+ lib.psrd_version_long.restype = ctypes.c_int
42
+ lib.psrd_version_long.argtypes = [ctypes.c_char_p, ctypes.c_long]
43
+ lib.psrd_help.restype = ctypes.c_int
44
+ lib.psrd_help.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
45
+ lib.psrd_set_log_level.restype = ctypes.c_int
46
+ lib.psrd_set_log_level.argtypes = [ctypes.c_long]
47
+ lib.psrd_get_log_level.restype = ctypes.c_int
48
+ lib.psrd_get_log_level.argtypes = [ctypes.POINTER(ctypes.c_long)]
49
+ lib.psrd_set_debug_mode.restype = ctypes.c_int
50
+ lib.psrd_set_debug_mode.argtypes = [ctypes.c_long]
51
+ lib.psrd_get_default_context.restype = ctypes.c_void_p
52
+ lib.psrd_get_default_context.argtypes = [ctypes.c_void_p]
53
+ lib.psrd_new_error.restype = ctypes.c_void_p
54
+ lib.psrd_new_error.argtypes = []
55
+ lib.psrd_error_code.restype = ctypes.c_int
56
+ lib.psrd_error_code.argtypes = [ctypes.c_void_p]
57
+ lib.psrd_error_message.restype = ctypes.c_int
58
+ lib.psrd_error_message.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long]
59
+ lib.psrd_free_error.restype = ctypes.c_int
60
+ lib.psrd_free_error.argtypes = [ctypes.c_void_p]
61
+ lib.psrd_study_load.restype = ctypes.c_void_p
62
+ lib.psrd_study_load.argtypes = [ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
63
+ lib.psrd_study_save.restype = ctypes.c_int
64
+ lib.psrd_study_save.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
65
+ lib.psrd_study_create.restype = ctypes.c_void_p
66
+ lib.psrd_study_create.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
67
+ lib.psrd_study_is_equals_to.restype = ctypes.c_int
68
+ lib.psrd_study_is_equals_to.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
69
+ lib.psrd_study_get_handler.restype = ctypes.c_longlong
70
+ lib.psrd_study_get_handler.argtypes = [ctypes.c_void_p]
71
+ lib.psrd_study_clone.restype = ctypes.c_void_p
72
+ lib.psrd_study_clone.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
73
+ lib.psrd_study_context.restype = ctypes.c_void_p
74
+ lib.psrd_study_context.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
75
+ lib.psrd_free_study.restype = ctypes.c_int
76
+ lib.psrd_free_study.argtypes = [ctypes.c_void_p]
77
+ lib.psrd_study_property_description_count.restype = ctypes.c_int
78
+ lib.psrd_study_property_description_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
79
+ lib.psrd_study_get_property_description.restype = ctypes.c_void_p
80
+ lib.psrd_study_get_property_description.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p]
81
+ lib.psrd_study_set_value.restype = ctypes.c_int
82
+ lib.psrd_study_set_value.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
83
+ lib.psrd_study_set_value_at.restype = ctypes.c_int
84
+ lib.psrd_study_set_value_at.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
85
+ lib.psrd_study_set_from_dict.restype = ctypes.c_int
86
+ lib.psrd_study_set_from_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
87
+ lib.psrd_study_get_value.restype = ctypes.c_int
88
+ lib.psrd_study_get_value.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p]
89
+ lib.psrd_study_get_value_at.restype = ctypes.c_int
90
+ lib.psrd_study_get_value_at.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
91
+ lib.psrd_study_get_as_dict.restype = ctypes.c_void_p
92
+ lib.psrd_study_get_as_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
93
+ lib.psrd_study_get_table.restype = ctypes.c_int
94
+ lib.psrd_study_get_table.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
95
+ lib.psrd_study_set_table.restype = ctypes.c_int
96
+ lib.psrd_study_set_table.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
97
+ lib.psrd_study_clear_values.restype = ctypes.c_int
98
+ lib.psrd_study_clear_values.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
99
+ lib.psrd_study_get_objects_values.restype = ctypes.c_int
100
+ lib.psrd_study_get_objects_values.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p]
101
+ lib.psrd_study_get_objects_values_at.restype = ctypes.c_int
102
+ lib.psrd_study_get_objects_values_at.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
103
+ lib.psrd_study_get_date_iterator_from_start.restype = ctypes.c_int
104
+ lib.psrd_study_get_date_iterator_from_start.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
105
+ lib.psrd_create.restype = ctypes.c_void_p
106
+ lib.psrd_create.argtypes = [ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p]
107
+ lib.psrd_study_add.restype = ctypes.c_int
108
+ lib.psrd_study_add.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
109
+ lib.psrd_study_remove.restype = ctypes.c_int
110
+ lib.psrd_study_remove.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
111
+ lib.psrd_study_find.restype = ctypes.c_void_p
112
+ lib.psrd_study_find.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p]
113
+ lib.psrd_study_find_by_id.restype = ctypes.c_void_p
114
+ lib.psrd_study_find_by_id.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p]
115
+ lib.psrd_study_find_by_code.restype = ctypes.c_void_p
116
+ lib.psrd_study_find_by_code.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int, ctypes.c_void_p]
117
+ lib.psrd_free_object.restype = ctypes.c_int
118
+ lib.psrd_free_object.argtypes = [ctypes.c_void_p]
119
+ lib.psrd_object_is_equals_to.restype = ctypes.c_int
120
+ lib.psrd_object_is_equals_to.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
121
+ lib.psrd_object_get_handler.restype = ctypes.c_longlong
122
+ lib.psrd_object_get_handler.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
123
+ lib.psrd_object_clone.restype = ctypes.c_void_p
124
+ lib.psrd_object_clone.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
125
+ lib.psrd_object_context.restype = ctypes.c_void_p
126
+ lib.psrd_object_context.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
127
+ lib.psrd_object_get_parent.restype = ctypes.c_void_p
128
+ lib.psrd_object_get_parent.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
129
+ lib.psrd_object_get_type.restype = ctypes.c_int
130
+ lib.psrd_object_get_type.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
131
+ lib.psrd_object_get_code.restype = ctypes.c_int
132
+ lib.psrd_object_get_code.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
133
+ lib.psrd_object_set_code.restype = ctypes.c_int
134
+ lib.psrd_object_set_code.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p]
135
+ lib.psrd_object_get_name.restype = ctypes.c_int
136
+ lib.psrd_object_get_name.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
137
+ lib.psrd_object_set_name.restype = ctypes.c_int
138
+ lib.psrd_object_set_name.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
139
+ lib.psrd_object_get_id.restype = ctypes.c_int
140
+ lib.psrd_object_get_id.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
141
+ lib.psrd_object_set_id.restype = ctypes.c_int
142
+ lib.psrd_object_set_id.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
143
+ lib.psrd_object_property_description_count.restype = ctypes.c_int
144
+ lib.psrd_object_property_description_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
145
+ lib.psrd_object_get_property_description.restype = ctypes.c_void_p
146
+ lib.psrd_object_get_property_description.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p]
147
+ lib.psrd_object_set_value.restype = ctypes.c_int
148
+ lib.psrd_object_set_value.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
149
+ lib.psrd_object_set_value_at.restype = ctypes.c_int
150
+ lib.psrd_object_set_value_at.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
151
+ lib.psrd_object_set_from_dict.restype = ctypes.c_int
152
+ lib.psrd_object_set_from_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
153
+ lib.psrd_object_get_value.restype = ctypes.c_int
154
+ lib.psrd_object_get_value.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p]
155
+ lib.psrd_object_get_value_at.restype = ctypes.c_int
156
+ lib.psrd_object_get_value_at.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
157
+ lib.psrd_object_get_as_dict.restype = ctypes.c_void_p
158
+ lib.psrd_object_get_as_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
159
+ lib.psrd_object_get_table.restype = ctypes.c_int
160
+ lib.psrd_object_get_table.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
161
+ lib.psrd_object_set_table.restype = ctypes.c_int
162
+ lib.psrd_object_set_table.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
163
+ lib.psrd_object_clear_values.restype = ctypes.c_int
164
+ lib.psrd_object_clear_values.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
165
+ lib.psrd_object_referenced_by.restype = ctypes.c_void_p
166
+ lib.psrd_object_referenced_by.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
167
+ lib.psrd_new_value.restype = ctypes.c_void_p
168
+ lib.psrd_new_value.argtypes = []
169
+ lib.psrd_free_value.restype = ctypes.c_int
170
+ lib.psrd_free_value.argtypes = [ctypes.c_void_p]
171
+ lib.psrd_value_get_type.restype = ctypes.c_int
172
+ lib.psrd_value_get_type.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
173
+ lib.psrd_value_get_int32.restype = ctypes.c_int
174
+ lib.psrd_value_get_int32.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
175
+ lib.psrd_value_set_int32.restype = ctypes.c_int
176
+ lib.psrd_value_set_int32.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p]
177
+ lib.psrd_value_get_int64.restype = ctypes.c_int
178
+ lib.psrd_value_get_int64.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
179
+ lib.psrd_value_set_int64.restype = ctypes.c_int
180
+ lib.psrd_value_set_int64.argtypes = [ctypes.c_void_p, ctypes.c_longlong, ctypes.c_void_p]
181
+ lib.psrd_value_get_bool.restype = ctypes.c_int
182
+ lib.psrd_value_get_bool.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
183
+ lib.psrd_value_set_bool.restype = ctypes.c_int
184
+ lib.psrd_value_set_bool.argtypes = [ctypes.c_void_p, ctypes.c_short, ctypes.c_void_p]
185
+ lib.psrd_value_get_date.restype = ctypes.c_int
186
+ lib.psrd_value_get_date.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
187
+ lib.psrd_value_set_date.restype = ctypes.c_int
188
+ lib.psrd_value_set_date.argtypes = [ctypes.c_void_p, ctypes.c_longlong, ctypes.c_void_p]
189
+ lib.psrd_value_get_float32.restype = ctypes.c_int
190
+ lib.psrd_value_get_float32.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_float), ctypes.c_void_p]
191
+ lib.psrd_value_set_float32.restype = ctypes.c_int
192
+ lib.psrd_value_set_float32.argtypes = [ctypes.c_void_p, ctypes.c_float, ctypes.c_void_p]
193
+ lib.psrd_value_get_float64.restype = ctypes.c_int
194
+ lib.psrd_value_get_float64.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double), ctypes.c_void_p]
195
+ lib.psrd_value_set_float64.restype = ctypes.c_int
196
+ lib.psrd_value_set_float64.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.c_void_p]
197
+ lib.psrd_value_get_string.restype = ctypes.c_int
198
+ lib.psrd_value_get_string.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
199
+ lib.psrd_value_set_string.restype = ctypes.c_int
200
+ lib.psrd_value_set_string.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
201
+ lib.psrd_value_get_object.restype = ctypes.c_void_p
202
+ lib.psrd_value_get_object.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
203
+ lib.psrd_value_set_object.restype = ctypes.c_int
204
+ lib.psrd_value_set_object.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
205
+ lib.psrd_value_get_list.restype = ctypes.c_void_p
206
+ lib.psrd_value_get_list.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
207
+ lib.psrd_value_set_list.restype = ctypes.c_int
208
+ lib.psrd_value_set_list.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
209
+ lib.psrd_value_get_dict.restype = ctypes.c_void_p
210
+ lib.psrd_value_get_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
211
+ lib.psrd_value_set_dict.restype = ctypes.c_int
212
+ lib.psrd_value_set_dict.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
213
+ lib.psrd_value_set_null.restype = ctypes.c_int
214
+ lib.psrd_value_set_null.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
215
+ lib.psrd_value_is_null.restype = ctypes.c_int
216
+ lib.psrd_value_is_null.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
217
+ lib.psrd_new_list.restype = ctypes.c_void_p
218
+ lib.psrd_new_list.argtypes = []
219
+ lib.psrd_free_list.restype = ctypes.c_int
220
+ lib.psrd_free_list.argtypes = [ctypes.c_void_p]
221
+ lib.psrd_list_count.restype = ctypes.c_int
222
+ lib.psrd_list_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
223
+ lib.psrd_list_clear.restype = ctypes.c_int
224
+ lib.psrd_list_clear.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
225
+ lib.psrd_list_get.restype = ctypes.c_int
226
+ lib.psrd_list_get.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
227
+ lib.psrd_list_set.restype = ctypes.c_int
228
+ lib.psrd_list_set.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
229
+ lib.psrd_list_append.restype = ctypes.c_int
230
+ lib.psrd_list_append.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
231
+ lib.psrd_new_dict.restype = ctypes.c_void_p
232
+ lib.psrd_new_dict.argtypes = []
233
+ lib.psrd_free_dict.restype = ctypes.c_int
234
+ lib.psrd_free_dict.argtypes = [ctypes.c_void_p]
235
+ lib.psrd_dict_count.restype = ctypes.c_int
236
+ lib.psrd_dict_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
237
+ lib.psrd_dict_clear.restype = ctypes.c_int
238
+ lib.psrd_dict_clear.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
239
+ lib.psrd_dict_get_by_key.restype = ctypes.c_int
240
+ lib.psrd_dict_get_by_key.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
241
+ lib.psrd_dict_get_by_index.restype = ctypes.c_int
242
+ lib.psrd_dict_get_by_index.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
243
+ lib.psrd_dict_get_key_by_index.restype = ctypes.c_int
244
+ lib.psrd_dict_get_key_by_index.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
245
+ lib.psrd_dict_get_value_by_index.restype = ctypes.c_int
246
+ lib.psrd_dict_get_value_by_index.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
247
+ lib.psrd_dict_set.restype = ctypes.c_int
248
+ lib.psrd_dict_set.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
249
+ lib.psrd_free_property_description.restype = ctypes.c_int
250
+ lib.psrd_free_property_description.argtypes = [ctypes.c_void_p]
251
+ lib.psrd_property_description_get_name.restype = ctypes.c_int
252
+ lib.psrd_property_description_get_name.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
253
+ lib.psrd_property_description_get_alternative_name.restype = ctypes.c_int
254
+ lib.psrd_property_description_get_alternative_name.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
255
+ lib.psrd_property_description_dimensions_count.restype = ctypes.c_int
256
+ lib.psrd_property_description_dimensions_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
257
+ lib.psrd_property_description_get_type.restype = ctypes.c_int
258
+ lib.psrd_property_description_get_type.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
259
+ lib.psrd_property_description_get_dimension_size.restype = ctypes.c_int
260
+ lib.psrd_property_description_get_dimension_size.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
261
+ lib.psrd_property_description_get_dimension_name.restype = ctypes.c_int
262
+ lib.psrd_property_description_get_dimension_name.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
263
+ lib.psrd_property_description_is_dynamic.restype = ctypes.c_int
264
+ lib.psrd_property_description_is_dynamic.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
265
+ lib.psrd_property_description_is_indexed.restype = ctypes.c_int
266
+ lib.psrd_property_description_is_indexed.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
267
+ lib.psrd_property_description_is_grouped.restype = ctypes.c_int
268
+ lib.psrd_property_description_is_grouped.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
269
+ lib.psrd_property_description_grouped_with.restype = ctypes.c_void_p
270
+ lib.psrd_property_description_grouped_with.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
271
+ lib.psrd_new_table.restype = ctypes.c_void_p
272
+ lib.psrd_new_table.argtypes = []
273
+ lib.psrd_free_table.restype = ctypes.c_int
274
+ lib.psrd_free_table.argtypes = [ctypes.c_void_p]
275
+ lib.psrd_table_load.restype = ctypes.c_int
276
+ lib.psrd_table_load.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
277
+ lib.psrd_table_save.restype = ctypes.c_int
278
+ lib.psrd_table_save.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
279
+ lib.psrd_table_is_indexed.restype = ctypes.c_int
280
+ lib.psrd_table_is_indexed.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
281
+ lib.psrd_table_resize.restype = ctypes.c_int
282
+ lib.psrd_table_resize.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p]
283
+ lib.psrd_table_configure_index.restype = ctypes.c_int
284
+ lib.psrd_table_configure_index.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p]
285
+ lib.psrd_table_configure_column.restype = ctypes.c_int
286
+ lib.psrd_table_configure_column.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p]
287
+ lib.psrd_table_columns_count.restype = ctypes.c_int
288
+ lib.psrd_table_columns_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
289
+ lib.psrd_table_column_get_name.restype = ctypes.c_int
290
+ lib.psrd_table_column_get_name.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
291
+ lib.psrd_table_column_set_name.restype = ctypes.c_int
292
+ lib.psrd_table_column_set_name.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
293
+ lib.psrd_table_column_values_count.restype = ctypes.c_int
294
+ lib.psrd_table_column_values_count.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
295
+ lib.psrd_table_column_get_value.restype = ctypes.c_int
296
+ lib.psrd_table_column_get_value.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
297
+ lib.psrd_table_column_set_value.restype = ctypes.c_int
298
+ lib.psrd_table_column_set_value.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
299
+ lib.psrd_table_rows_count.restype = ctypes.c_int
300
+ lib.psrd_table_rows_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
301
+ lib.psrd_table_index_count.restype = ctypes.c_int
302
+ lib.psrd_table_index_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_long), ctypes.c_void_p]
303
+ lib.psrd_table_index_get_name.restype = ctypes.c_int
304
+ lib.psrd_table_index_get_name.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
305
+ lib.psrd_table_index_set_name.restype = ctypes.c_int
306
+ lib.psrd_table_index_set_name.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
307
+ lib.psrd_table_index_get_value.restype = ctypes.c_int
308
+ lib.psrd_table_index_get_value.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
309
+ lib.psrd_table_index_set_value.restype = ctypes.c_int
310
+ lib.psrd_table_index_set_value.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_void_p, ctypes.c_void_p]
311
+ lib.psrd_table_column_set_float32_values.restype = ctypes.c_int
312
+ lib.psrd_table_column_set_float32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_float), ctypes.c_void_p]
313
+ lib.psrd_table_column_set_float64_values.restype = ctypes.c_int
314
+ lib.psrd_table_column_set_float64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_double), ctypes.c_void_p]
315
+ lib.psrd_table_column_set_int_values.restype = ctypes.c_int
316
+ lib.psrd_table_column_set_int_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
317
+ lib.psrd_table_column_set_date_values.restype = ctypes.c_int
318
+ lib.psrd_table_column_set_date_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
319
+ lib.psrd_table_column_set_null_values.restype = ctypes.c_int
320
+ lib.psrd_table_column_set_null_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.c_void_p]
321
+ lib.psrd_table_index_set_int32_values.restype = ctypes.c_int
322
+ lib.psrd_table_index_set_int32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
323
+ lib.psrd_table_index_set_int64_values.restype = ctypes.c_int
324
+ lib.psrd_table_index_set_int64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
325
+ lib.psrd_table_index_set_float32_values.restype = ctypes.c_int
326
+ lib.psrd_table_index_set_float32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_float), ctypes.c_void_p]
327
+ lib.psrd_table_index_set_float64_values.restype = ctypes.c_int
328
+ lib.psrd_table_index_set_float64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_double), ctypes.c_void_p]
329
+ lib.psrd_table_index_set_date_values.restype = ctypes.c_int
330
+ lib.psrd_table_index_set_date_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
331
+ lib.psrd_table_column_get_float32_values.restype = ctypes.c_int
332
+ lib.psrd_table_column_get_float32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_float), ctypes.c_void_p]
333
+ lib.psrd_table_column_get_float64_values.restype = ctypes.c_int
334
+ lib.psrd_table_column_get_float64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_double), ctypes.c_void_p]
335
+ lib.psrd_table_column_get_int32_values.restype = ctypes.c_int
336
+ lib.psrd_table_column_get_int32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
337
+ lib.psrd_table_column_get_int64_values.restype = ctypes.c_int
338
+ lib.psrd_table_column_get_int64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
339
+ lib.psrd_table_column_get_date_values.restype = ctypes.c_int
340
+ lib.psrd_table_column_get_date_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
341
+ lib.psrd_table_index_get_int32_values.restype = ctypes.c_int
342
+ lib.psrd_table_index_get_int32_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_int), ctypes.c_void_p]
343
+ lib.psrd_table_index_get_int64_values.restype = ctypes.c_int
344
+ lib.psrd_table_index_get_int64_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
345
+ lib.psrd_table_index_get_date_values.restype = ctypes.c_int
346
+ lib.psrd_table_index_get_date_values.argtypes = [ctypes.c_void_p, ctypes.c_long, ctypes.POINTER(ctypes.c_longlong), ctypes.c_void_p]
347
+ lib.psrd_new_date_iterator.restype = ctypes.c_void_p
348
+ lib.psrd_new_date_iterator.argtypes = []
349
+ lib.psrd_free_date_iterator.restype = ctypes.c_int
350
+ lib.psrd_free_date_iterator.argtypes = [ctypes.c_void_p]
351
+ lib.psrd_date_iterator_at_start.restype = ctypes.c_int
352
+ lib.psrd_date_iterator_at_start.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
353
+ lib.psrd_date_iterator_at_end.restype = ctypes.c_int
354
+ lib.psrd_date_iterator_at_end.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_void_p]
355
+ lib.psrd_date_iterator_get_value.restype = ctypes.c_int
356
+ lib.psrd_date_iterator_get_value.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_long, ctypes.c_void_p]
357
+
psr/factory/py.typed ADDED
File without changes
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.4
2
+ Name: psr-factory
3
+ Version: 4.1.0b1
4
+ Summary: PSR database management module.
5
+ Author-email: "PSR Inc." <psrfactory@psr-inc.com>
6
+ Project-URL: documentation, https://docs.psr-inc.com/factory/
7
+ Classifier: Programming Language :: Python :: 3
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+
11
+ PSR Factory (version 4.1.0.1)
12
+ ============================
13
+
14
+ Factory is a library that helps to manage SDDP cases.
15
+ It contains functions that create, load, and save studies, and also functions that create,
16
+ access, and modify objects in a study.
17
+
18
+
19
+ Installation
20
+ ------------
21
+
22
+ ### System-wide installation
23
+
24
+ Open the command prompt and run the following command:
25
+
26
+ ```bash
27
+ pip install psr_factory-4.1.0b1-py3-none-win_amd64.whl
28
+ ```
29
+
30
+ Factory will be available to all Python scripts in your system after importing it:
31
+
32
+ ```python
33
+ import psr.factory
34
+ ```
35
+
36
+ ### Local/project-specific usage
37
+
38
+ Copy the folder `psr` and its contents to your project folder or a specific folder (e.g., `C:\path\to\factory`). Then, in your Python script, add the following lines:
39
+
40
+ ```python
41
+ import sys
42
+ sys.path.append(r"C:\path\to\factory")
43
+ import psr.factory
44
+ ```
45
+
46
+
47
+ Usage sample
48
+ ------------
49
+
50
+ ```python
51
+ import psr.factory
52
+
53
+ study = psr.factory.load_study(r"C:\temp\my\study")
54
+ system_1 = study.find("System.*")[0]
55
+
56
+ battery = psr.factory.create("Battery")
57
+ battery.code = 1
58
+ battery.name = "Battery 1"
59
+ battery.set("InstalledCapacity", 10.0)
60
+ battery.set("RefSystem", system_1)
61
+ study.add(battery)
62
+
63
+ study.save(r"C:\temp\my\updated_study")
64
+ ```
65
+
66
+
67
+ Full documentation
68
+ ------------------
69
+
70
+ The full documentation and reference is available at [https://docs.psr-inc.com/factory/](https://docs.psr-inc.com/manual/factory/).
71
+
72
+ Releases
73
+ --------
74
+
75
+ New releases can be found in the release notes at [https://psrenergy-docs.github.io/factory/releases.html](https://psrenergy-docs.github.io/factory/releases.html).
@@ -0,0 +1,11 @@
1
+ psr/factory/__init__.py,sha256=qTL9K1ZXBFl0gj6BDlOPYwpkSioRji2AdspIYiz0XTY,218
2
+ psr/factory/api.py,sha256=a2iH0am4O9SStICiy0iID_s3OHX__fC2w0q9UczQUFk,95251
3
+ psr/factory/factory.dll,sha256=mueQ_en8H4zUOg1f29MHeTXMJ6q6j1BxspeYBXu0ooo,17736240
4
+ psr/factory/factory.pmd,sha256=3fGQyBFd16Msfn4ZJe8TDFc759XylW5HqQhdwsSReMM,228259
5
+ psr/factory/factory.pmk,sha256=1AQ9L3PAPmCvFZaecjGH7psIa-SURZ7WNnZp1rCnL98,551552
6
+ psr/factory/factorylib.py,sha256=7WK-g9K8juNoEwndCeTGYLMOV421QjO8Q0NlTqgvZzs,26839
7
+ psr/factory/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ psr_factory-4.1.0b1.dist-info/METADATA,sha256=0lLz3hKkYWc_KezxfGQj5C93-dbm3Q9NiO2O3nsSsXg,1956
9
+ psr_factory-4.1.0b1.dist-info/WHEEL,sha256=GRAwO4abswPoD8u6X5Ix8yKoy-wTIXRf_V-PAIDNIsM,97
10
+ psr_factory-4.1.0b1.dist-info/top_level.txt,sha256=Jb393O96WQk3b5D1gMcrZBLKJJgZpzNjTPoldUi00ck,4
11
+ psr_factory-4.1.0b1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-win_amd64
5
+
@@ -0,0 +1 @@
1
+ psr