title: Is it possible to store the alembic connect string outside of alembic.ini?
body: <p>I'm using Alembic with SQLAlchemy. With SQLAlchemy, I tend to follow a pattern where I don't store the connect string with the versioned code. Instead I have file <code>secret.py</code> that contains any confidential information. I throw this filename in my <code>.gitignore</code> so it doesn't end up on GitHub.</p>
  <p>This pattern works fine, but now I'm getting into using Alembic for migrations. It appears that I cannot hide the connect string. Instead in <code>alembic.ini</code>, you place the connect string as a <a href="http://alembic.readthedocs.org/en/latest/tutorial.html#editing-the-ini-file" rel="nofollow noreferrer">configuration parameter</a>:</p>
  <pre><code># the 'revision' command, regardless of autogenerate
  # revision_environment = false
  
  sqlalchemy.url = driver://user:pass@localhost/dbname
  
  # Logging configuration
  [loggers]
  keys = root,sqlalchemy,alembi
  </code></pre>
  <p>I fear I'm going to accidentally commit a file with username/password information for my database. I'd rather store this connect string in a single place and avoid the risk of accidentally committing it to version control.</p>
  <p>What options do I have?</p>