File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,6 +328,38 @@ Returns: [yara_x.ScanResults](#scanresults)
328328
329329Raises: [ yara_x.ScanError] ( #scanerror ) , [ yara_x.TimeoutError] ( #timeouterror )
330330
331+ #### .imports()
332+
333+ An array with the names of the modules imported by the rules.
334+
335+ #### .serialize_into(file)
336+
337+ Serializes the rules into a file-like object.
338+
339+ ##### Example
340+
341+ ``` python
342+ rules = yara_x.compile(" rule test { condition: true }" )
343+ f = io.BytesIO()
344+ rules.serialize_into(f)
345+ f.seek(0 )
346+ rules = yara_x.Rules.deserialize_from(f)
347+ ```
348+
349+ #### .deserialize_from(file)
350+
351+ Deserializes rules from a file-like object.
352+
353+ ##### Example
354+
355+ ``` python
356+ rules = yara_x.compile(" rule test { condition: true }" )
357+ f = io.BytesIO()
358+ rules.serialize_into(f)
359+ f.seek(0 )
360+ rules = yara_x.Rules.deserialize_from(f)
361+ ```
362+
331363---------
332364
333365### Scanner
@@ -426,8 +458,6 @@ during the scan, if any.
426458A tuple of pairs ` (identifier, value) ` with the metadata associated to the
427459rule.
428460
429- ---------
430-
431461### Pattern
432462
433463Type that represents a pattern in a [ Rule] ( #rule ) . Contains information about
You can’t perform that action at this time.
0 commit comments