Myconnections
Connects to Oracle databases or sftp servers depending on configured environmental variables.
VERY IMPORTANT: VPN must exist.
Installation
Use the package manager pip to install myconnections.
pip install git+https://github.com/jtorre94/myconnections
Usage
from myconnections import Connections
# automatically detects the connection type and returns the connection object.
conn_bwup = Connections('RBIP')
conn_serafin = Connections('SERAFIN')
Configuring environmental variables to make it work
Five environmental variables per connection must be configured: The below example is configured for an Oracle DB called BWUP.
| Variable name | Example value |
|---|---|
| BWUP_TYPE | ORACLE |
| BWUP_USER | MY_USER |
| BWUP_PASS | MY_PASSWORD |
| BWUP_HOSTNAME | XX.X.XXX.XX (digits) |
| BWUP_PORT | 1541 |
The below example is for a sftp server called SERAFIN.
| Variable name | Example value |
|---|---|
| SERAFIN_TYPE | SFTP |
| SERAFIN_USER | MY_USER |
| SERAFIN_PASS | MY_PASSWORD |
| SERAFIN_HOSTNAME | XX.X.XXX.XX (digits) |
| SERAFIN_PORT | None |
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.