evennia/docs/2.x/api/evennia.utils.search.html
2023-12-20 18:20:52 +01:00

449 lines
No EOL
27 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>evennia.utils.search &#8212; Evennia 2.x documentation</title>
<link rel="stylesheet" href="../_static/nature.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="evennia.utils.test_resources" href="evennia.utils.test_resources.html" />
<link rel="prev" title="evennia.utils.picklefield" href="evennia.utils.picklefield.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="evennia.utils.test_resources.html" title="evennia.utils.test_resources"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="evennia.utils.picklefield.html" title="evennia.utils.picklefield"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-4"><a href="evennia.utils.html" accesskey="U">evennia.utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.utils.search</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/evennia_logo.png" alt="Logo"/>
</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h4>Previous topic</h4>
<p class="topless"><a href="evennia.utils.picklefield.html"
title="previous chapter">evennia.utils.picklefield</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="evennia.utils.test_resources.html"
title="next chapter">evennia.utils.test_resources</a></p>
<div role="note" aria-label="source link">
<!--h3>This Page</h3-->
<ul class="this-page-menu">
<li><a href="../_sources/api/evennia.utils.search.md.txt"
rel="nofollow">Show Page Source</a></li>
</ul>
</div><h3>Links</h3>
<ul>
<li><a href="https://www.evennia.com/docs/latest/index.html">Documentation Top</a> </li>
<li><a href="https://www.evennia.com">Evennia Home</a> </li>
<li><a href="https://github.com/evennia/evennia">Github</a> </li>
<li><a href="http://games.evennia.com">Game Index</a> </li>
<li>
<a href="https://discord.gg/AJJpcRUhtF">Discord</a> -
<a href="https://github.com/evennia/evennia/discussions">Discussions</a> -
<a href="https://evennia.blogspot.com/">Blog</a>
</li>
</ul>
</div>
</div>
<div class="bodywrapper">
<div class="body" role="main">
<section id="module-evennia.utils.search">
<span id="evennia-utils-search"></span><h1>evennia.utils.search<a class="headerlink" href="#module-evennia.utils.search" title="Permalink to this headline"></a></h1>
<p>This is a convenient container gathering all the main
search methods for the various database tables.</p>
<p>It is intended to be used e.g. as</p>
<p>&gt; from evennia.utils import search
&gt; match = search.objects(…)</p>
<p>Note that this is not intended to be a complete listing of all search
methods! You need to refer to the respective manager to get all
possible search methods. To get to the managers from your code, import
the database model and call its objects property.</p>
<p>Also remember that all commands in this file return lists (also if
there is only one match) unless noted otherwise.</p>
<dl class="simple">
<dt>Example: To reach the search method get_object_with_account</dt><dd><p>in evennia/objects/managers.py:</p>
</dd>
</dl>
<p>&gt; from evennia.objects.models import ObjectDB
&gt; match = Object.objects.get_object_with_account(…)</p>
<dl class="py function">
<dt id="evennia.utils.search.search_object">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_object</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">searchdata</span></em>, <em class="sig-param"><span class="n">attribute_name</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">candidates</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">use_dbref</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">tags</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_object" title="Permalink to this definition"></a></dt>
<dd><p>Search as an object globally or in a list of candidates and
return results. The result is always an Object. Always returns
a list.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>searchdata</strong> (<em>str</em><em> or </em><em>Object</em>) The entity to match for. This is
usually a key string but may also be an object itself.
By default (if no <strong>attribute_name</strong> is set), this will
search <strong>object.key</strong> and <strong>object.aliases</strong> in order.
Can also be on the form #dbref, which will (if
<strong>exact=True</strong>) be matched against primary key.</p></li>
<li><p><strong>attribute_name</strong> (<em>str</em>) Use this named Attribute to
match searchdata against, instead of the defaults. If
this is the name of a database field (with or without
the <strong>db_</strong> prefix), that will be matched too.</p></li>
<li><p><strong>typeclass</strong> (<em>str</em><em> or </em><em>TypeClass</em>) restrict matches to objects
having this typeclass. This will help speed up global
searches.</p></li>
<li><p><strong>candidates</strong> (<em>list</em>) If supplied, search will
only be performed among the candidates in this list. A
common list of candidates is the contents of the
current location searched.</p></li>
<li><p><strong>exact</strong> (<em>bool</em>) Match names/aliases exactly or partially.
Partial matching matches the beginning of words in the
names/aliases, using a matching routine to separate
multiple matches in names with multiple components (so
“bi sw” will match “Big sword”). Since this is more
expensive than exact matching, it is recommended to be
used together with the <strong>candidates</strong> keyword to limit the
number of possibilities. This value has no meaning if
searching for attributes/properties.</p></li>
<li><p><strong>use_dbref</strong> (<em>bool</em>) If False, bypass direct lookup of a string
on the form #dbref and treat it like any string.</p></li>
<li><p><strong>tags</strong> (<em>list</em>) A list of tuples <strong>(tagkey, tagcategory)</strong> where the
matched object must have _all_ tags in order to be considered
a match.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>matches (list)</em> Matching objects</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_account">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_account</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ostring</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">True</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_account" title="Permalink to this definition"></a></dt>
<dd><p>Searches for a particular account by name or
database id.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ostring</strong> (<em>str</em><em> or </em><em>int</em>) A key string or database id.</p></li>
<li><p><strong>exact</strong> (<em>bool</em><em>, </em><em>optional</em>) Only valid for string matches. If
<strong>True</strong>, requires exact (non-case-sensitive) match,
otherwise also match also keys containing the <strong>ostring</strong>
(non-case-sensitive fuzzy match).</p></li>
<li><p><strong>typeclass</strong> (<em>str</em><em> or </em><em>Typeclass</em><em>, </em><em>optional</em>) Limit the search only to
accounts of this typeclass.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Queryset</em> A queryset (an iterable) with 0, 1 or more matches.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_script">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_script</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ostring</span></em>, <em class="sig-param"><span class="n">obj</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">only_timed</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">typeclass</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_script" title="Permalink to this definition"></a></dt>
<dd><p>Search for a particular script.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ostring</strong> (<em>str</em>) Search criterion - a script dbef or key.</p></li>
<li><p><strong>obj</strong> (<em>Object</em><em>, </em><em>optional</em>) Limit search to scripts defined on
this object</p></li>
<li><p><strong>only_timed</strong> (<em>bool</em>) Limit search only to scripts that run
on a timer.</p></li>
<li><p><strong>typeclass</strong> (<em>class</em><em> or </em><em>str</em>) Typeclass or path to typeclass.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Queryset</em> An iterable with 0, 1 or more results.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_message">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_message</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">sender</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">receiver</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">freetext</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">dbref</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_message" title="Permalink to this definition"></a></dt>
<dd><p>Search the message database for particular messages. At least
one of the arguments must be given to do a search.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>sender</strong> (<em>Object</em><em>, </em><em>Account</em><em> or </em><em>Script</em><em>, </em><em>optional</em>) Get messages sent by a particular sender.</p></li>
<li><p><strong>receiver</strong> (<em>Object</em><em>, </em><em>Account</em><em> or </em><em>Channel</em><em>, </em><em>optional</em>) Get messages
received by a certain account,object or channel</p></li>
<li><p><strong>freetext</strong> (<em>str</em>) Search for a text string in a message. NOTE:
This can potentially be slow, so make sure to supply one of
the other arguments to limit the search.</p></li>
<li><p><strong>dbref</strong> (<em>int</em>) The exact database id of the message. This will override
all other search criteria since its unique and
always gives only one match.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Queryset</em> Iterable with 0, 1 or more matches.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_channel">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_channel</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ostring</span></em>, <em class="sig-param"><span class="n">exact</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_channel" title="Permalink to this definition"></a></dt>
<dd><p>Search the channel database for a particular channel.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ostring</strong> (<em>str</em>) The key or database id of the channel.</p></li>
<li><p><strong>exact</strong> (<em>bool</em><em>, </em><em>optional</em>) Require an exact (but not
case sensitive) match.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Queryset</em> Iterable with 0, 1 or more matches.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_help_entry">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_help_entry</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">ostring</span></em>, <em class="sig-param"><span class="n">help_category</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_help_entry" title="Permalink to this definition"></a></dt>
<dd><p>Retrieve a search entry object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>ostring</strong> (<em>str</em>) The help topic to look for.</p></li>
<li><p><strong>category</strong> (<em>str</em>) Limit the search to a particular help topic</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>Queryset</em> An iterable with 0, 1 or more matches.</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_tag">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_tag" title="Permalink to this definition"></a></dt>
<dd><p>Find object based on tag or category.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) The tag key to search for.</p></li>
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) The category of tag
to search for. If not set, uncategorized
tags will be searched.</p></li>
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) type of Tag, by default
this is either <strong>None</strong> (a normal Tag), <strong>alias</strong> or
<strong>permission</strong>. This always apply to all queried tags.</p></li>
<li><p><strong>kwargs</strong> (<em>any</em>) Other optional parameter that may be supported
by the manager method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>matches (list)</em> </p>
<dl class="simple">
<dt>List of Objects with tags matching</dt><dd><p>the search criteria, or an empty list if no
matches were found.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_script_tag">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_script_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/search.html#search_script_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.search.search_script_tag" title="Permalink to this definition"></a></dt>
<dd><p>Find script based on tag or category.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) The tag key to search for.</p></li>
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) The category of tag
to search for. If not set, uncategorized
tags will be searched.</p></li>
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) type of Tag, by default
this is either <strong>None</strong> (a normal Tag), <strong>alias</strong> or
<strong>permission</strong>. This always apply to all queried tags.</p></li>
<li><p><strong>kwargs</strong> (<em>any</em>) Other optional parameter that may be supported
by the manager method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>matches (list)</em> </p>
<dl class="simple">
<dt>List of Scripts with tags matching</dt><dd><p>the search criteria, or an empty list if no
matches were found.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_account_tag">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_account_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/search.html#search_account_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.search.search_account_tag" title="Permalink to this definition"></a></dt>
<dd><p>Find account based on tag or category.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) The tag key to search for.</p></li>
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) The category of tag
to search for. If not set, uncategorized
tags will be searched.</p></li>
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) type of Tag, by default
this is either <strong>None</strong> (a normal Tag), <strong>alias</strong> or
<strong>permission</strong>. This always apply to all queried tags.</p></li>
<li><p><strong>kwargs</strong> (<em>any</em>) Other optional parameter that may be supported
by the manager method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>matches (list)</em> </p>
<dl class="simple">
<dt>List of Accounts with tags matching</dt><dd><p>the search criteria, or an empty list if no
matches were found.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_channel_tag">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_channel_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">key</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">category</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">tagtype</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/evennia/utils/search.html#search_channel_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#evennia.utils.search.search_channel_tag" title="Permalink to this definition"></a></dt>
<dd><p>Find channel based on tag or category.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<em>str</em><em>, </em><em>optional</em>) The tag key to search for.</p></li>
<li><p><strong>category</strong> (<em>str</em><em>, </em><em>optional</em>) The category of tag
to search for. If not set, uncategorized
tags will be searched.</p></li>
<li><p><strong>tagtype</strong> (<em>str</em><em>, </em><em>optional</em>) type of Tag, by default
this is either <strong>None</strong> (a normal Tag), <strong>alias</strong> or
<strong>permission</strong>. This always apply to all queried tags.</p></li>
<li><p><strong>kwargs</strong> (<em>any</em>) Other optional parameter that may be supported
by the manager method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><p><em>matches (list)</em> </p>
<dl class="simple">
<dt>List of Channels with tags matching</dt><dd><p>the search criteria, or an empty list if no
matches were found.</p>
</dd>
</dl>
</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="evennia.utils.search.search_typeclass">
<code class="sig-prename descclassname">evennia.utils.search.</code><code class="sig-name descname">search_typeclass</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">typeclass</span></em>, <em class="sig-param"><span class="n">include_children</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">include_parents</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="headerlink" href="#evennia.utils.search.search_typeclass" title="Permalink to this definition"></a></dt>
<dd><p>Searches through all objects returning those of a certain typeclass.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>typeclass</strong> (<em>str</em><em> or </em><em>class</em>) A typeclass class or a python path to a typeclass.</p></li>
<li><p><strong>include_children</strong> (<em>bool</em><em>, </em><em>optional</em>) Return objects with
given typeclass <em>and</em> all children inheriting from this
typeclass. Mutuall exclusive to <strong>include_parents</strong>.</p></li>
<li><p><strong>include_parents</strong> (<em>bool</em><em>, </em><em>optional</em>) Return objects with
given typeclass <em>and</em> all parents to this typeclass.
Mutually exclusive to <strong>include_children</strong>.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><em>objects (list)</em> The objects found with the given typeclasses.</p>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
</div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="evennia.utils.test_resources.html" title="evennia.utils.test_resources"
>next</a> |</li>
<li class="right" >
<a href="evennia.utils.picklefield.html" title="evennia.utils.picklefield"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Evennia 2.x</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../Evennia-API.html" >API Summary</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="evennia-api.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="evennia.html" >evennia</a> &#187;</li>
<li class="nav-item nav-item-4"><a href="evennia.utils.html" >evennia.utils</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">evennia.utils.search</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2023, The Evennia developer community.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.2.1.
</div>
</body>
</html>