Created
June 4, 2021 11:33
-
-
Save piotrkilczuk/6ed797e6bf983606ade0ab0bc817bf84 to your computer and use it in GitHub Desktop.
pythonstartup_exec_2.bash
This file contains hidden or 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
$ PYTHONSTARTUP=./_pythonstartup.py ipython | |
Python 3.9.0 (default, Nov 19 2020, 14:06:03) | |
Type 'copyright', 'credits' or 'license' for more information | |
IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help. | |
In [1]: session | |
Out[1]: <sqlalchemy.orm.session.Session at 0x7f1efed0ee50> | |
In [2]: session.execute("SELECT * FROM users").fetchall() | |
Out[2]: [(1, 'johndoe', 'somehash')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment