This file is indexed.

/usr/share/doc/python-pymongo-doc/html/api/pymongo/uri_parser.html is in python-pymongo-doc 2.7.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>uri_parser – Tools to parse and validate a MongoDB URI &mdash; PyMongo 2.7.2 documentation</title>
    
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '2.7.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/sidebar.js"></script>
    <link rel="top" title="PyMongo 2.7.2 documentation" href="../../index.html" />
    <link rel="up" title="pymongo – Python driver for MongoDB" href="index.html" />
    <link rel="next" title="gridfs – Tools for working with GridFS" href="../gridfs/index.html" />
    <link rel="prev" title="cursor_manager – Managers to handle when cursors are killed after being closed – DEPRECATED" href="cursor_manager.html" /> 
  </head>
  <body>
    <div class="related">
      <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="../gridfs/index.html" title="gridfs – Tools for working with GridFS"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="cursor_manager.html" title="cursor_manager – Managers to handle when cursors are killed after being closed – DEPRECATED"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">PyMongo 2.7.2 documentation</a> &raquo;</li>
          <li><a href="../index.html" >API Documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U"><tt class="docutils literal"><span class="pre">pymongo</span></tt> &#8211; Python driver for MongoDB</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-pymongo.uri_parser">
<span id="uri-parser-tools-to-parse-and-validate-a-mongodb-uri"></span><h1><tt class="xref py py-mod docutils literal"><span class="pre">uri_parser</span></tt> &#8211; Tools to parse and validate a MongoDB URI<a class="headerlink" href="#module-pymongo.uri_parser" title="Permalink to this headline"></a></h1>
<p>Tools to parse and validate a MongoDB URI.</p>
<dl class="function">
<dt id="pymongo.uri_parser.parse_host">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">parse_host</tt><big>(</big><em>entity</em>, <em>default_port=27017</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.parse_host" title="Permalink to this definition"></a></dt>
<dd><p>Validates a host string</p>
<p>Returns a 2-tuple of host followed by port where port is default_port
if it wasn&#8217;t specified in the string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last">
<li><dl class="first docutils">
<dt><cite>entity</cite>: A host or host:port string where host could be a</dt>
<dd><p class="first last">hostname or IP address.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><cite>default_port</cite>: The port number to use when one wasn&#8217;t</dt>
<dd><p class="first last">specified in entity.</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.parse_ipv6_literal_host">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">parse_ipv6_literal_host</tt><big>(</big><em>entity</em>, <em>default_port</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.parse_ipv6_literal_host" title="Permalink to this definition"></a></dt>
<dd><p>Validates an IPv6 literal host:port string.</p>
<p>Returns a 2-tuple of IPv6 literal followed by port where
port is default_port if it wasn&#8217;t specified in entity.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last">
<li><dl class="first docutils">
<dt><cite>entity</cite>: A string that represents an IPv6 literal enclosed</dt>
<dd><p class="first last">in braces (e.g. &#8216;[::1]&#8217; or &#8216;[::1]:27017&#8217;).</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><cite>default_port</cite>: The port number to use when one wasn&#8217;t</dt>
<dd><p class="first last">specified in entity.</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.parse_uri">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">parse_uri</tt><big>(</big><em>uri</em>, <em>default_port=27017</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.parse_uri" title="Permalink to this definition"></a></dt>
<dd><p>Parse and validate a MongoDB URI.</p>
<p>Returns a dict of the form:</p>
<div class="highlight-python"><div class="highlight"><pre>{
    &#39;nodelist&#39;: &lt;list of (host, port) tuples&gt;,
    &#39;username&#39;: &lt;username&gt; or None,
    &#39;password&#39;: &lt;password&gt; or None,
    &#39;database&#39;: &lt;database name&gt; or None,
    &#39;collection&#39;: &lt;collection name&gt; or None,
    &#39;options&#39;: &lt;dict of MongoDB URI options&gt;
}
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last">
<li><p class="first"><cite>uri</cite>: The MongoDB URI to parse.</p>
</li>
<li><dl class="first docutils">
<dt><cite>default_port</cite>: The port number to use when one wasn&#8217;t specified</dt>
<dd><p class="first last">for a host in the URI.</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.parse_userinfo">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">parse_userinfo</tt><big>(</big><em>userinfo</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.parse_userinfo" title="Permalink to this definition"></a></dt>
<dd><p>Validates the format of user information in a MongoDB URI.
Reserved characters like &#8216;:&#8217;, &#8216;/&#8217;, &#8216;+&#8217; and &#8216;&#64;&#8217; must be escaped
following RFC 2396.</p>
<p>Returns a 2-tuple containing the unescaped username followed
by the unescaped password.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Paramaters:</th><td class="field-body"><ul class="first last simple">
<li><cite>userinfo</cite>: A string of the form &lt;username&gt;:&lt;password&gt;</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 2.2: </span>Now uses <cite>urllib.unquote_plus</cite> so <cite>+</cite> characters must be escaped.</p>
</div>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.split_hosts">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">split_hosts</tt><big>(</big><em>hosts</em>, <em>default_port=27017</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.split_hosts" title="Permalink to this definition"></a></dt>
<dd><p>Takes a string of the form host1[:port],host2[:port]... and
splits it into (host, port) tuples. If [:port] isn&#8217;t present the
default_port is used.</p>
<p>Returns a set of 2-tuples containing the host name (or IP) followed by
port number.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last">
<li><p class="first"><cite>hosts</cite>: A string of the form host1[:port],host2[:port],...</p>
</li>
<li><dl class="first docutils">
<dt><cite>default_port</cite>: The port number to use when one wasn&#8217;t specified</dt>
<dd><p class="first last">for a host.</p>
</dd>
</dl>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.split_options">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">split_options</tt><big>(</big><em>opts</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.split_options" title="Permalink to this definition"></a></dt>
<dd><p>Takes the options portion of a MongoDB URI, validates each option
and returns the options in a dictionary. The option names will be returned
lowercase even if camelCase options are used.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><cite>opt</cite>: A string representing MongoDB URI options.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="pymongo.uri_parser.validate_options">
<tt class="descclassname">pymongo.uri_parser.</tt><tt class="descname">validate_options</tt><big>(</big><em>opts</em><big>)</big><a class="headerlink" href="#pymongo.uri_parser.validate_options" title="Permalink to this definition"></a></dt>
<dd><p>Validates and normalizes options passed in a MongoDB URI.</p>
<p>Returns a new dictionary of validated and normalized options.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><cite>opts</cite>: A dict of MongoDB URI options.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="cursor_manager.html"
                        title="previous chapter"><tt class="docutils literal"><span class="pre">cursor_manager</span></tt> &#8211; Managers to handle when cursors are killed after being closed &#8211; DEPRECATED</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../gridfs/index.html"
                        title="next chapter"><tt class="docutils literal"><span class="pre">gridfs</span></tt> &#8211; Tools for working with GridFS</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/api/pymongo/uri_parser.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <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="../gridfs/index.html" title="gridfs – Tools for working with GridFS"
             >next</a> |</li>
        <li class="right" >
          <a href="cursor_manager.html" title="cursor_manager – Managers to handle when cursors are killed after being closed – DEPRECATED"
             >previous</a> |</li>
        <li><a href="../../index.html">PyMongo 2.7.2 documentation</a> &raquo;</li>
          <li><a href="../index.html" >API Documentation</a> &raquo;</li>
          <li><a href="index.html" ><tt class="docutils literal"><span class="pre">pymongo</span></tt> &#8211; Python driver for MongoDB</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2008 - 2014, MongoDB, Inc..
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>