title: How to use wild cards in SQLAlchemy?
body: <p>I'm trying to use wildcards for a query using SQLAlchemy but I'm getting back an empty list.</p>
  
  <p>My code:</p>
  
  <pre><code>engine = create_engine(os.getenv("DATABASE_URL"))
  db = scoped_session(sessionmaker(bind=engine))
  s = input("Search for a book: ")
  q = db.execute(f"SELECT * FROM books WHERE isbn LIKE '%\:s\%' OR author LIKE '%\:s\%' OR title LIKE '%\:s\%'", {"s": s}).fetchall()
  </code></pre>
  
  <p>I'm using <code>\</code> to escape the quotes that get inserted when the function uses the values of the placeholder variables, if I remove them I get this error:</p>
  
  <pre><code>sqlalchemy.exc.ProgrammingError: (psycopg2.errors.SyntaxError) syntax error at or near "grey"
  LINE 1: SELECT * FROM books WHERE isbn LIKE '%'grey'%' OR author LIK...
  </code></pre>
  
  <p>Is there anyway to use wildcards in SQLAlchemy?</p>
  
  <p>I can make this work by using formatted strings instead of placeholders for variables but this will make my code vulnerable against SQL Injections. 
  I'm also using PostgreSQL.</p>