https://github.com/cwaldbieser/pyoracle_tui
Terminal user interface for making SQL queries against an Orale DB
https://github.com/cwaldbieser/pyoracle_tui
Last synced: 25 days ago
JSON representation
Terminal user interface for making SQL queries against an Orale DB
- Host: GitHub
- URL: https://github.com/cwaldbieser/pyoracle_tui
- Owner: cwaldbieser
- License: gpl-3.0
- Created: 2025-01-24T15:11:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-29T19:04:51.000Z (10 months ago)
- Last Synced: 2025-10-26T23:32:45.063Z (8 months ago)
- Language: Python
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
PyOracle TUI
============
A terminal user interface for eexecuting SQL queries against an Oracle database.
Requirements:
- Python 3.12+
- Oracle Instant Client
Setup when using `pipenv`
-------------------------
Create a `.env` file that appends the Oracle instant client location to LD_LIBRARY_PATH.
e.g.
.. code-block:: sh
LD_LIBRARY_PATH=/home/myuser/.local/opt/oracle/instantclient_21.1:"$LD_LIBRARY_PATH"
Confguring Tabs
---------------
In `~/.config/pyoracle_tui/pyoracle_tui.toml`.
Basic structure is:
.. code-block:: toml
[tab.1]
sql_file = "/tmp/pyoracle.01.sql"
results_file = "/tmp/pyoracle-results.01.csv"
[tab.2]
sql_file = "/tmp/pyoracle.02.sql"
results_file = "/tmp/pyoracle-results.02.csv"
Configuring connections
-----------------------
In `~/.config/pyoracle_tui/pyoracle_tui.toml`.
Basic structure is:
.. code-block:: toml
[connections.conn01]
desc = "XYZZY Connection"
host = "xyzzy.example.org"
database = "magic"
user = "wizard"
passwd = "pr3$to!"
[connections.conn02]
desc = "FROTZ Connection"
host = "zork.examle.com"
database = "gue"
user = "adventurer"
passwd = "bra$$lantern"
Environment Variables
---------------------
- EDITOR - external editor to use for composing queries.
- SPREADSHEET - external spreadsheet application to use for exporting data.
Example Commandline
-------------------
.. code-block:: shell
$ pipenv run textual run ./pyoracle_tui.py