| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A minimal Python project that demonstrates how to connect to an Oracle database using the python-oracledb driver.
Clone the Repository:
git clone https://github.com/apandis/python-oracledb-example.git
cd python-oracledb-examplCreate and Activate a Virtual Environment:
python -m venv envenv\Scripts\activatesource env/bin/activateInstall Dependencies:
pip install -r requirements.txtConfigure Environment Variables:
Create a .env file in the project root with the following content:
DB_USER=your_username
DB_PASS=your_password
DB_SERVER=your_server_address
DB_PORT=1521
DB_SERVICE=your_service_nameTo connect to the Oracle database and execute a sample query, run:
python src/main.pyTo run the tests, use:
python -m unittest discover tests| Back | FazBrowse Home | New Git URL |