sure, if your PG database allows you to connect using "trust" or other
localhost-style connection you can omit everything from the URL

create_engine("postgresql://localhost/dbname")

or

create_engine("postgresql://user@localhost/dbname")

create_engine("postgresql:///dbname")

etc

On Tue, Mar 5, 2019 at 2:31 PM Rich Shepard <[email protected]> wrote:
>
> I'm writing an application for my business use; I'll be the only user and
> postgres is on the same server/workstation host. When I specify the engine
> using create_engine() can I leave off at least my password if not both it
> and my username? The database to which SA is connecting is owned by me.
>
> TIA,
>
> Rich
>
> --
> SQLAlchemy -
> The Python SQL Toolkit and Object Relational Mapper
>
> http://www.sqlalchemy.org/
>
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example.  See  http://stackoverflow.com/help/mcve for a full 
> description.
> ---
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to