Skip to main content

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


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.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

sol_orm_lib-0.4.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file sol_orm_lib-0.4.0.tar.gz.

File metadata

  • Download URL: sol_orm_lib-0.4.0.tar.gz
  • Upload date:
  • Size: 9.0 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

Hashes for sol_orm_lib-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f104d4e8b88dda360f8ee0972084f563296d81820ed44f47a37a244cef5c2654
MD5 eb1221a57e5df258da47bb6f1e6a3efc
BLAKE2b-256 d2a166f49129ab770bac42e3595a380f8fa045a71edaaff0097a8053620d9c80

See more details on using hashes here.

File details

Details for the file sol_orm_lib-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: sol_orm_lib-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 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

Hashes for sol_orm_lib-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f34dd1caea95c9e11c62cd41bab818be17f9fa31e04209e625106bcf801ad95
MD5 cca0a84be9c978f06d122bca4cf8211e
BLAKE2b-256 a1831eb9a5352c3e301095d01b19b1002c4abca811fa4e96fbaba622f4f3ce11

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page