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.
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.8.tar.gz
(9.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sol_orm_lib-0.4.8.tar.gz.
File metadata
- Download URL: sol_orm_lib-0.4.8.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-84-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdb8a014bcc651e4ba20996e9ee6b941710f862f1a1b3f7622510cb7d05b22c7
|
|
| MD5 |
b526e0df49ecdaba647d19836fba31ec
|
|
| BLAKE2b-256 |
d1a4488deb28872d882b10933b8b3b8fab68f45ca1eb6deafc9da9ba2bd79f33
|
File details
Details for the file sol_orm_lib-0.4.8-py3-none-any.whl.
File metadata
- Download URL: sol_orm_lib-0.4.8-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-84-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a61a1c50a7cbb32e38dfd8fcf4a4eafea5cbfdfec2aee3a704e1dcae31b8df2b
|
|
| MD5 |
d2052bdbffd0459cf189c2d8b668c99e
|
|
| BLAKE2b-256 |
a4d834efde1d144bd95c8879bbbc98d29a5ac49f88ab9b3909e68377dd0d8c42
|