|
48 | 48 | </dl> |
49 | 49 | </dd></dl> |
50 | 50 |
|
51 | | -<dl class="py method"> |
52 | | -<dt id="weaviate.client.Client.query"> |
53 | | -<code class="sig-name descname">query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">gql_query</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.client.Client.query" title="Permalink to this definition">¶</a></dt> |
54 | | -<dd><dl class="simple"> |
55 | | -<dt>Allows to send simple graph QL string queries.</dt><dd><p>To create more complex GQL queries please use a GQL python client. |
56 | | -Be cautious of injection risks when generating query strings.</p> |
57 | | -</dd> |
58 | | -</dl> |
59 | | -<dl class="field-list simple"> |
60 | | -<dt class="field-odd">Parameters</dt> |
61 | | -<dd class="field-odd"><p><strong>gql_query</strong> (<em>str</em>) – A GQL query in form of a string</p> |
62 | | -</dd> |
63 | | -<dt class="field-even">Returns</dt> |
64 | | -<dd class="field-even"><p>Data response of the query</p> |
65 | | -</dd> |
66 | | -<dt class="field-odd">Raises</dt> |
67 | | -<dd class="field-odd"><p>TypeError: If parameter has the wrong type. |
68 | | -ConnectionError: if the network connection to weaviate fails. |
69 | | -UnexpectedStatusCodeException: if weaviate reports a none OK status.</p> |
70 | | -</dd> |
71 | | -</dl> |
72 | | -</dd></dl> |
73 | | - |
74 | | -</dd></dl> |
75 | | - |
76 | | -<span class="target" id="module-weaviate.batch"></span><dl class="py class"> |
77 | | -<dt id="weaviate.batch.ActionsBatchRequest"> |
78 | | -<em class="property">class </em><code class="sig-prename descclassname">weaviate.batch.</code><code class="sig-name descname">ActionsBatchRequest</code><a class="headerlink" href="#weaviate.batch.ActionsBatchRequest" title="Permalink to this definition">¶</a></dt> |
79 | | -<dd><p>Collect things for one batch request to weaviate. |
80 | | -Caution this batch will not be validated through weaviate.</p> |
81 | | -<dl class="py method"> |
82 | | -<dt id="weaviate.batch.ActionsBatchRequest.add_action"> |
83 | | -<code class="sig-name descname">add_action</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">action</span></em>, <em class="sig-param"><span class="n">class_name</span></em>, <em class="sig-param"><span class="n">uuid</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.batch.ActionsBatchRequest.add_action" title="Permalink to this definition">¶</a></dt> |
84 | | -<dd><p>Add an action to this batch</p> |
85 | | -<dl class="field-list simple"> |
86 | | -<dt class="field-odd">Parameters</dt> |
87 | | -<dd class="field-odd"><ul class="simple"> |
88 | | -<li><p><strong>action</strong> (<em>dict</em>) – that should be added as part of the batch.</p></li> |
89 | | -<li><p><strong>class_name</strong> (<em>str</em>) – class of the action.</p></li> |
90 | | -<li><p><strong>uuid</strong> (<em>str</em>) – if given the thing will be added under this uuid.</p></li> |
91 | | -</ul> |
92 | | -</dd> |
93 | | -<dt class="field-even">Raises</dt> |
94 | | -<dd class="field-even"><p>TypeError, ValueError</p> |
95 | | -</dd> |
96 | | -</dl> |
97 | | -</dd></dl> |
98 | | - |
99 | | -<dl class="py method"> |
100 | | -<dt id="weaviate.batch.ActionsBatchRequest.get_request_body"> |
101 | | -<code class="sig-name descname">get_request_body</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.batch.ActionsBatchRequest.get_request_body" title="Permalink to this definition">¶</a></dt> |
102 | | -<dd><p>Get the request body as it is needed for weaviate</p> |
103 | | -<dl class="field-list simple"> |
104 | | -<dt class="field-odd">Returns</dt> |
105 | | -<dd class="field-odd"><p>the request body as a dict</p> |
106 | | -</dd> |
107 | | -</dl> |
108 | | -</dd></dl> |
109 | | - |
110 | | -</dd></dl> |
111 | | - |
112 | | -<dl class="py class"> |
113 | | -<dt id="weaviate.batch.EntityBatchRequest"> |
114 | | -<em class="property">class </em><code class="sig-prename descclassname">weaviate.batch.</code><code class="sig-name descname">EntityBatchRequest</code><a class="headerlink" href="#weaviate.batch.EntityBatchRequest" title="Permalink to this definition">¶</a></dt> |
115 | | -<dd><p>Base for storing entities</p> |
116 | | -</dd></dl> |
117 | | - |
118 | | -<dl class="py class"> |
119 | | -<dt id="weaviate.batch.ReferenceBatchRequest"> |
120 | | -<em class="property">class </em><code class="sig-prename descclassname">weaviate.batch.</code><code class="sig-name descname">ReferenceBatchRequest</code><a class="headerlink" href="#weaviate.batch.ReferenceBatchRequest" title="Permalink to this definition">¶</a></dt> |
121 | | -<dd><p>Collect references to add them in one request to weaviate. |
122 | | -Caution this request will miss some validations to be faster.</p> |
123 | | -<dl class="py method"> |
124 | | -<dt id="weaviate.batch.ReferenceBatchRequest.add_reference"> |
125 | | -<code class="sig-name descname">add_reference</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">from_entity_uuid</span></em>, <em class="sig-param"><span class="n">from_entity_class_name</span></em>, <em class="sig-param"><span class="n">from_property_name</span></em>, <em class="sig-param"><span class="n">to_entity_uuid</span></em>, <em class="sig-param"><span class="n">from_semantic_type</span><span class="o">=</span><span class="default_value">'things'</span></em>, <em class="sig-param"><span class="n">to_semantic_type</span><span class="o">=</span><span class="default_value">'things'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.batch.ReferenceBatchRequest.add_reference" title="Permalink to this definition">¶</a></dt> |
126 | | -<dd><p>Add one reference to this batch</p> |
127 | | -<dl class="field-list simple"> |
128 | | -<dt class="field-odd">Parameters</dt> |
129 | | -<dd class="field-odd"><ul class="simple"> |
130 | | -<li><p><strong>from_entity_uuid</strong> (<em>str in form of UUID</em>) – The UUID or URL of the thing that should reference another entity.</p></li> |
131 | | -<li><p><strong>from_entity_class_name</strong> (<em>str</em>) – The name of the class that should reference another entity.</p></li> |
132 | | -<li><p><strong>from_property_name</strong> (<em>str</em>) – The name of the property that contains the reference.</p></li> |
133 | | -<li><p><strong>to_entity_uuid</strong> (<em>str</em>) – The UUID or URL of the thing that is actually referenced.</p></li> |
134 | | -<li><p><strong>from_semantic_type</strong> (<em>str</em>) – Either things or actions. |
135 | | -Defaults to things. |
136 | | -Settable through the constants SEMANTIC_TYPE_THINGS and SEMANTIC_TYPE_ACTIONS</p></li> |
137 | | -<li><p><strong>to_semantic_type</strong> (<em>str</em>) – Either things or actions. |
138 | | -Defaults to things. |
139 | | -Settable through the constants SEMANTIC_TYPE_THINGS and SEMANTIC_TYPE_ACTIONS</p></li> |
140 | | -</ul> |
141 | | -</dd> |
142 | | -<dt class="field-even">Returns</dt> |
143 | | -<dd class="field-even"><p>None if successful</p> |
144 | | -</dd> |
145 | | -<dt class="field-odd">Raises</dt> |
146 | | -<dd class="field-odd"><p>TypeError: If arguments are not string.</p> |
147 | | -</dd> |
148 | | -</dl> |
149 | | -</dd></dl> |
150 | | - |
151 | 51 | </dd></dl> |
152 | 52 |
|
153 | | -<dl class="py class"> |
154 | | -<dt id="weaviate.batch.ThingsBatchRequest"> |
155 | | -<em class="property">class </em><code class="sig-prename descclassname">weaviate.batch.</code><code class="sig-name descname">ThingsBatchRequest</code><a class="headerlink" href="#weaviate.batch.ThingsBatchRequest" title="Permalink to this definition">¶</a></dt> |
156 | | -<dd><p>Collect things for one batch request to weaviate. |
157 | | -Caution this batch will not be validated through weaviate.</p> |
158 | | -<dl class="py method"> |
159 | | -<dt id="weaviate.batch.ThingsBatchRequest.add_thing"> |
160 | | -<code class="sig-name descname">add_thing</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">thing</span></em>, <em class="sig-param"><span class="n">class_name</span></em>, <em class="sig-param"><span class="n">uuid</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.batch.ThingsBatchRequest.add_thing" title="Permalink to this definition">¶</a></dt> |
161 | | -<dd><p>Add a thing to this batch</p> |
162 | | -<dl class="field-list simple"> |
163 | | -<dt class="field-odd">Parameters</dt> |
164 | | -<dd class="field-odd"><ul class="simple"> |
165 | | -<li><p><strong>thing</strong> (<em>dict</em>) – that should be added as part of the batch.</p></li> |
166 | | -<li><p><strong>class_name</strong> (<em>str</em>) – class of the thing.</p></li> |
167 | | -<li><p><strong>uuid</strong> (<em>str</em>) – if given the thing will be added under this uuid.</p></li> |
168 | | -</ul> |
169 | | -</dd> |
170 | | -<dt class="field-even">Raises</dt> |
171 | | -<dd class="field-even"><p>TypeError, ValueError</p> |
172 | | -</dd> |
173 | | -</dl> |
174 | | -</dd></dl> |
175 | | - |
176 | | -<dl class="py method"> |
177 | | -<dt id="weaviate.batch.ThingsBatchRequest.get_request_body"> |
178 | | -<code class="sig-name descname">get_request_body</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.batch.ThingsBatchRequest.get_request_body" title="Permalink to this definition">¶</a></dt> |
179 | | -<dd><p>Get the request body as it is needed for weaviate</p> |
180 | | -<dl class="field-list simple"> |
181 | | -<dt class="field-odd">Returns</dt> |
182 | | -<dd class="field-odd"><p>the request body as a dict</p> |
183 | | -</dd> |
184 | | -</dl> |
185 | | -</dd></dl> |
186 | | - |
187 | | -</dd></dl> |
188 | | - |
189 | | -<span class="target" id="module-weaviate.util"></span><dl class="py function"> |
| 53 | +<span class="target" id="module-weaviate.batch"></span><span class="target" id="module-weaviate.util"></span><dl class="py function"> |
190 | 54 | <dt id="weaviate.util.generate_local_beacon"> |
191 | 55 | <code class="sig-prename descclassname">weaviate.util.</code><code class="sig-name descname">generate_local_beacon</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">to_uuid</span></em>, <em class="sig-param"><span class="n">semantic_type</span><span class="o">=</span><span class="default_value">'things'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.util.generate_local_beacon" title="Permalink to this definition">¶</a></dt> |
192 | 56 | <dd><p>Generates a beacon to the given schema class type with the given uuid.</p> |
|
231 | 95 | </dl> |
232 | 96 | </dd></dl> |
233 | 97 |
|
| 98 | +<dl class="py function"> |
| 99 | +<dt id="weaviate.util.is_object_url"> |
| 100 | +<code class="sig-prename descclassname">weaviate.util.</code><code class="sig-name descname">is_object_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">input</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.util.is_object_url" title="Permalink to this definition">¶</a></dt> |
| 101 | +<dd><dl class="simple"> |
| 102 | +<dt>Validates if an url like <a class="reference external" href="http://localhost:8080/v1/things/1c9cd584-88fe-5010-83d0-017cb3fcb446">http://localhost:8080/v1/things/1c9cd584-88fe-5010-83d0-017cb3fcb446</a> references a thing.</dt><dd><p>it only validates the path not the host or the protocol</p> |
| 103 | +</dd> |
| 104 | +</dl> |
| 105 | +<dl class="field-list simple"> |
| 106 | +<dt class="field-odd">Parameters</dt> |
| 107 | +<dd class="field-odd"><p><strong>input</strong> (<em>str</em>) – </p> |
| 108 | +</dd> |
| 109 | +<dt class="field-even">Returns</dt> |
| 110 | +<dd class="field-even"><p></p> |
| 111 | +</dd> |
| 112 | +</dl> |
| 113 | +</dd></dl> |
| 114 | + |
234 | 115 | <dl class="py function"> |
235 | 116 | <dt id="weaviate.util.is_semantic_type"> |
236 | 117 | <code class="sig-prename descclassname">weaviate.util.</code><code class="sig-name descname">is_semantic_type</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">semantic_type</span></em><span class="sig-paren">)</span><a class="headerlink" href="#weaviate.util.is_semantic_type" title="Permalink to this definition">¶</a></dt> |
|
0 commit comments