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

Uploaded Source

Built Distribution

sol_orm_lib-0.4.7-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sol_orm_lib-0.4.7.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

Hashes for sol_orm_lib-0.4.7.tar.gz
Algorithm Hash digest
SHA256 289ec72becfe9868a71d15d454990c0592d59ca0a855e0467ee62018349709c9
MD5 7007dde39b31f120197e3323f2a12473
BLAKE2b-256 b6352d63469357d50201acd4f976a280ba95cf69b63f8b0ad97755c1c8f12a6f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sol_orm_lib-0.4.7-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

Hashes for sol_orm_lib-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 10e339edb2e3ace629c94aaf7277635dd67af3e6ca0bb69fd631b229c955d3aa
MD5 b143f3c84828e912ab30eb3d4f20c95f
BLAKE2b-256 3d73a47970da4ff5adbfa9c2eb500ca31ae3b27fdd41daf033c886e5e50bcf85

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