<pre><codeclass="python language-python hljs"><Path> = <Path>.parent <spanclass="hljs-comment"># Returns Path without final component.</span>
<pre><codeclass="python language-python hljs"><Path> = <Path>.parent <spanclass="hljs-comment"># Returns Path without the final component.</span>
<str> = <Path>.name <spanclass="hljs-comment"># Returns final component as a string.</span>
<str> = <Path>.stem <spanclass="hljs-comment"># Returns final component without extension.</span>
<str> = <Path>.suffix <spanclass="hljs-comment"># Returns final component's extension.</span>
<div><h4id="or">Or:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">with</span><conn>: <spanclass="hljs-comment"># Exits the block with commit() or rollback(),</span>
<conn>.execute(<spanclass="hljs-string">'<query>'</span>) <spanclass="hljs-comment"># depending on whether an exception occurred.</span>
<conn>.execute(<spanclass="hljs-string">'<query>'</span>) <spanclass="hljs-comment"># depending on whether any exception occurred.</span>
</code></pre></div>
<div><h3id="placeholders">Placeholders</h3><ul>
<li><strong>Passed values can be of type str, int, float, bytes, None, bool, datetime.date or datetime.datetme.</strong></li>
<li><strong>Passed values can be of type str, int, float, bytes, None, bool, datetime.date or datetime.datetime.</strong></li>
<li><strong>Bools will be stored and returned as ints and dates as <ahref="#encode">ISO formatted strings</a>.</strong></li>
</ul><pre><codeclass="python language-python hljs"><conn>.execute(<spanclass="hljs-string">'<query>'</span>, <list/tuple>) <spanclass="hljs-comment"># Replaces '?'s in query with values.</span>
<conn>.execute(<spanclass="hljs-string">'<query>'</span>, <dict/namedtuple>) <spanclass="hljs-comment"># Replaces ':<key>'s with values.</span>