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.6.tar.gz
(9.4 kB
view details)
Built Distribution
File details
Details for the file sol_orm_lib-0.4.6.tar.gz
.
File metadata
- Download URL: sol_orm_lib-0.4.6.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/5.15.0-89-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d663590d868ca79de8ff075dcc7582a63c398814abc1eaeafed0373c588e223e |
|
MD5 | 7e2c2032bbe352d240f59807ca7e92d3 |
|
BLAKE2b-256 | ab37c5ba89389f4185b5768ce847ccd1def35368facf6889af93eda892ce3ff3 |
File details
Details for the file sol_orm_lib-0.4.6-py3-none-any.whl
.
File metadata
- Download URL: sol_orm_lib-0.4.6-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/5.15.0-89-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bd98bab2bab5508decbebfe414689f7480a1c5e09db93bb3b3fbff237f93d81 |
|
MD5 | 521910ebeeebc698487ffdb68a4f88b8 |
|
BLAKE2b-256 | 2ee63c087c1ddf06c1cf91460b34571db9783e0ed61bad85348469685482f32b |