No project description provided
Project description
SOL Python ORM Library
Installation
pip install sol-orm-lib
Example usage
from sol_orm_lib.models import *
from sol_orm_lib.sol_orm import SolORM
# Instantiate SolORM object
db = SolORM("https://db-api.sol.idener.es")
# Create an object
mw = MeasuredWeather(
rad_ar=27.2,
temp_ar=39,
wind_ar=12,
timestamp=current_milli_time(),
)
# Add it to the DB
response = db.add_entity(mw)
print(response)
Local ORM
from sol_orm_lib.models import *
from sol_orm_lib.sol_local_orm import SolLocalORM
db = SolLocalORM(host="100.91.35.146", port=3306, db="bcm", user="bcm", password="bcm", debug=True)
ent = StorageStatusTAC(
k=1,
n=2,
storageActual=3,
storageActualKwh=4,
storageInverterRealised=5,
storageMax=6
)
db.add_entity(ent)
result = db.get_last_entity(StorageStatusTAC)
print(result)
Release process
To release a new version of the package, update the version number in the pyproject.toml
file and publish a release with the same tag. The CI will build and publish the package to PyPI.
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
sol_orm_lib-0.4.2.tar.gz
(9.1 kB
view details)
Built Distribution
File details
Details for the file sol_orm_lib-0.4.2.tar.gz
.
File metadata
- Download URL: sol_orm_lib-0.4.2.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/5.15.0-84-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebdbd2f35058f3c796faf3ff5b3a1be22337c0cf9a2ee6f67760dab91bad8be6 |
|
MD5 | 31368efee0a3ce4d2d4caa7eaa6ae083 |
|
BLAKE2b-256 | de863115a87cd800adc3a8977cbd6df0b476d75416e87bd03f2e3c515076a21e |
File details
Details for the file sol_orm_lib-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: sol_orm_lib-0.4.2-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/5.15.0-84-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07aacce35aee917cc4cf0bb9ecfd1f302dd38ed563fa5bb72fb160d7d5ee2b03 |
|
MD5 | e9c7f66930410f057edd8be9925ecd1e |
|
BLAKE2b-256 | 4e99c698a1f08b776b54c9097767bb785152eab7e129b70f8bef9c7cf84422fe |