<scripttype="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"Contribution guide","image":[""],"dateModified":"2026-06-28T18:25:20.000Z","author":[]}</script><metaproperty="og:url" content="https://psqlpy-python.github.io/contribute.html"><metaproperty="og:site_name" content="PSQLPy"><metaproperty="og:title" content="Contribution guide"><metaproperty="og:description" content="We love contributions. This guide is for all fellas who want to make psqlpy better together. There are several rules for contributors: Please do not add malware. Please make sur..."><metaproperty="og:type" content="article"><metaproperty="og:locale" content="en-US"><metaproperty="og:updated_time" content="2026-06-28T18:25:20.000Z"><metaproperty="article:modified_time" content="2026-06-28T18:25:20.000Z"><title>Contribution guide | PSQLPy</title><metaname="description" content="We love contributions. This guide is for all fellas who want to make psqlpy better together. There are several rules for contributors: Please do not add malware. Please make sur...">
<spanclass="line"><spanstyle="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">> pip install -U pip maturin prek pytest pytest-anyio pydantic pgpq</span></span></code></pre><divclass="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><divclass="line-number"></div><divclass="line-number"></div><divclass="line-number"></div></div></div><p>Then you need to build <code>PSQLPy</code> project.</p><divclass="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><preclass="shiki shiki-themes one-light one-dark-pro vp-code"><codeclass="language-bash"><spanclass="line"><spanstyle="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">maturin</span><spanstyle="--shiki-light:#50A14F;--shiki-dark:#98C379;"> develop</span></span></code></pre><divclass="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><divclass="line-number"></div></div></div><p>After this step project is built and installed in your python environment you created in previous step.</p><h2id="linting-and-type-checking" tabindex="-1"><aclass="header-anchor" href="#linting-and-type-checking"><span>Linting and type checking</span></a></h2><p>We have prek configured with all our settings. We highly recommend you to install it as a git hook using prek install command.</p><p>But even without installation, you can run all lints manually:</p><divclass="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><preclass="shiki shiki-themes one-light one-dark-pro vp-code"><codeclass="language-bash"><spanclass="line"><spanstyle="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">prek</span><spanstyle="--shiki-light:#50A14F;--shiki-dark:#98C379;"> run</span><spanstyle="--shiki-light:#986801;--shiki-dark:#D19A66;"> -a</span></span></code></pre><divclass="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><divclass="line-number"></div></div></div><h2id="testing" tabindex="-1"><aclass="header-anchor" href="#testing"><span>Testing</span></a></h2><p>You need to have <code>PostgreSQL</code> server somewhere to run <code>pytest</code>.</p><p>Default credentials for testing <code>PostgreSQL</code> and you can configure it with env:</p><ul><li>host: <code>localhost</code> (env: POSTGRES_HOST)</li><li>user: <code>postgres</code> (env: POSTGRES_USER)</li><li>password: <code>postgres</code> (env: POSTGRES_PASSWORD)</li><li>port: <code>5432</code> (env: POSTGRES_PORT)</li><li>dbname: <code>psqlpy_test</code> (env: POSTGRES_DBNAME)</li></ul><p>We have tests with required SSL mode, so, if you don't want to run PostgreSQL in SSL mode, you could run</p><divclass="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><preclass="shiki shiki-themes one-light one-dark-pro vp-code"><codeclass="language-bash"><spanclass="line"><spanstyle="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">pytest</span><spanstyle="--shiki-light:#986801;--shiki-dark:#D19A66;"> --ignore=</span><spanstyle="--shiki-light:#50A14F;--shiki-dark:#98C379;">"./python/tests/test_ssl_mode.py"</span></span></code></pre><divclass="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><divclass="line-number"></div></div></div><p>If you have PostgreSQL with enabled ssl mode, you need to set path to your <code>ca_file</code> in <code>POSTGRES_CERT_FILE</code> env. And run</p><divclass="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><preclass="shiki shiki-themes one-light one-dark-pro vp-code"><codeclass="language-bash"><spanclass="line"><spanstyle="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">pytest</span></span></code></pre><divclass="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><divclass="line-number"></div></div></div></div><!----><!----><!----></div><footerclass="vp-page-meta"><divclass="vp-meta-item edit-link"><aclass="auto-link external-link vp-meta-label" href="https://github.com/psqlpy-python/psqlpy/edit/main/contribute.md" aria-label="Edit this page" rel="noopener noreferrer" target="_blank"><!--[--><svgxmlns="http://www.w3.org/2000/svg" class="icon edit-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="edit icon" name="edit"><pathd="M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"></path><pathd="M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"></path></svg><!--]-->Edit this page<!----></a></div><divclass="vp-meta-item git-info"><divclass="update-time"><spanclass="vp-meta-label">Last Updated</span><timeclass="vp-meta-info" datetime="2026-06-28T18:25:20.000Z" data-allow-mismatch>6/28/26, 6:25 PM</time></div><divclass="contributors"><spanclass="vp-meta-label">Contributors: </span><!--[--><!--[--><spanclass="vp-meta-info" title="email: chandr@chandr.net">chandr-andr (Kiselev Aleksandr)</span><!--]--><!--]--></div></div></footer><navclass="vp-page-nav"><aclass="route-link auto-link prev" href="/external_connection_pools.html" aria-label="External connection pools"><divclass="hint"><spanclass="arrow start"></span>Prev</div><divclass="link"><!---->External connection pools</div></a><aclass="route-link auto-link next" href="/benchmarks.html" aria-label="Benchmarks"><divclass="hint">Next<spanclass="arrow end"></span></div><divclass="link">Benchmarks<!----></div></a></nav><!----><!----><!--]--></main><!--]--><!----></div><!--]--><!--]--><!--[--><!----><!----><!--[--><!--]--><!--]--><!--]--></div>