Last active
December 12, 2019 10:35
-
-
Save yyscamper/a73ed02bd54d6d813ed8d6a415ca9bdb to your computer and use it in GitHub Desktop.
SQLAlchemy Postgresql Quote Identifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
engine = create_engine('postgresql://user:[email protected]:5432/dbname') | |
engine.dialect.identifier_preparer.quote('table') | |
engine.dialect.identifier_preparer.quote_identifier('table') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hyperlink to the relevant documentation: https://docs.sqlalchemy.org/en/13/core/internals.html#sqlalchemy.sql.compiler.IdentifierPreparer