Python-Oracle SQL ORM
Project description
python-oraclesql-orm
Python to Oracle SQL Object Relationship Mapping(ORM)
Authors
- Alexandra Kmet
- Stanislav Dzundza
Install
Preinstallation:
- Download Oracle Instant Client for your OS
- Unzip it
- Create ORACLE_CLIENT environment variable with unzipped directory path
- Reload your machine
Installation
Project can be downloaded or installed using PyPI To install from PyPI:
- ensure you have already installed Python 3.7+ and pip on machine
- open terminal and run command
pip install py-2-oracle-sql-orm
Database
We provide database deployed on Azure
User: lab3
Password: lab3
Host: 40.117.92.106/pdb1
Usage
Rules:
- Types of attribule must be specified
class Test:
int_attr = int
str_attr = str
list_attr = list()
object_attr = TestAttr
def __init__(self, int_attr, str_attr, list_attr, object_attr):
self.int_attr = int_attr
self.str_attr = str_attr
self.list_attr = list_attr
self.object_attr = object_attr
Supported types: int
, float
, str
, list
, tuple
, dict
, set
, frozenset
, object
-
Create instanse of
DbCredentials
and set your database credentials>>> db_credentials = DbCredentials('lab3', 'lab3', '40.117.92.106/pdb1')
-
Create instanse of
Py2SQL
and connect to database>>> orm = Py2SQL() >>> orm.db_connect(db_credentials)
-
Use provided methods
-
Don't forget to disconnect
>>> orm.db_disconnect()
Example
For better understanding it is highly recommended to start from examples included in project
Classes for demonstration are located in demo_classes.py
Run main.py to start demonstration
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for py_2_oracle_sql_orm-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77c61fd59dc18ca71be3925c0b8ed5cd6aa8f9972e7b828e6a74a4c9050397f3 |
|
MD5 | f8d2327d649b84e13d7ac259bd044e92 |
|
BLAKE2b-256 | 73a4601bc672c9d3692cc6de06da4bcb306e4386413840a8470da6de88a4ec24 |
Close
Hashes for py_2_oracle_sql_orm-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 711f0b449ed914a9d97ed8e53b0052e87ae70f5ebd39ef374bed9b81c5572f67 |
|
MD5 | 61014ce5a015667f0fa999986a4cbc7e |
|
BLAKE2b-256 | 71f4faf305f23dae06ab2ff35f1dfa7770d2f45cbe2f39d37fc2527f743eb177 |