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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73c0d51d72028f2cb4ec11a956356627147b0bec572f20fb57a6da86e346fa09 |
|
MD5 | cec75f0db7f9025a87b3cab32713f55c |
|
BLAKE2b-256 | f6b74f39f48789027bceb1ae5d359c59e3c51d77c423cb4463fc42902632c22f |
Close
Hashes for py_2_oracle_sql_orm-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a05a578c98f39365f84cbf19f7b1c2cc8ac166a4b8f429ca1ebcf8e768dca80 |
|
MD5 | 1212724b824119873444948db7a026a8 |
|
BLAKE2b-256 | a166d38f40855f66cb78b0a1b2afd9d5c90ab7345ede788cb4267834fe12d077 |