LicenseGuard

Is psycopg2 safe for commercial use?

PyPI package · License: LGPL

psycopg2 is licensed under LGPL. Nothing below is blocked, but it carries a source-disclosure obligation — what triggers it differs by how you ship, so read the table. Note that "LGPL" does not name a specific version — the stricter reading (LGPL-3.0-only) is used below, so confirm the actual version against the project's own LICENSE file.

Can I use psycopg2 in SaaS, a distributed app, or internally?

How you ship itResultWhy
Hosted SaaS No obligation LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.
Distributed binary / app No obligation LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.
Delivered to customer No obligation LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.
Internal use only No obligation LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.
Published library No obligation LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

What obligations does psycopg2 carry?

Source disclosureAttribution

If you only use it at build time, the answer changes.

LGPL-3.0-only appears as a dev dependency, so it is not part of the artifact you ship. Distribution-triggered obligations do not arise. Tools that emit code into your output, such as code generators, are a separate case worth checking individually.

Questions this page answers

Is psycopg2 safe for commercial use?

psycopg2 is licensed under LGPL. Nothing below is blocked, but it carries a source-disclosure obligation — what triggers it differs by how you ship, so read the table. Note that "LGPL" does not name a specific version — the stricter reading (LGPL-3.0-only) is used below, so confirm the actual version against the project's own LICENSE file.

Can I use psycopg2 (LGPL) in hosted saas?

LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

Can I use psycopg2 (LGPL) in distributed binary / app?

LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

Can I use psycopg2 (LGPL) in delivered to customer?

LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

Can I use psycopg2 (LGPL) in internal use only?

LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

Can I use psycopg2 (LGPL) in published library?

LGPL-3.0-only requires publishing modifications to the library itself, but under dynamic linking that obligation does not extend to the code that calls it.

Does psycopg2 matter if it is only a build-time or dev dependency?

LGPL-3.0-only appears as a dev dependency, so it is not part of the artifact you ship. Distribution-triggered obligations do not arise. Tools that emit code into your output, such as code generators, are a separate case worth checking individually.

This page covers one package. Your requirements.txt has many more.

Check your whole manifest →

How was this determined?

The license was read from the PyPI registry, then evaluated against each shipping model. Only the declared license is considered; code copied into a project's own source files is not detected by this method.

License data last reviewed .

LicenseGuard reports information derived from published license texts and dependency manifests. It is not legal advice and using it does not create an attorney-client relationship. Results reflect license metadata as declared; they do not identify every obligation or violation. Consult qualified counsel for decisions that matter.

Listed in the official MCP registry, on Glama and on Smithery. Source on GitHub (Apache-2.0).