SDK for interacting with the PVSite database
Project description
pvsite_datamodel
Python library to interact with PV Site postgres database
Structure
pvsite_datamodel:
read: # Sub package containing modules for reading from the database
write: # Sub package containing modules for writing to the database
- connection.py # Class for connecting to the database
- schema.py # Pandera pandas dataframe validation schemas
- sqlmodels.py # SQLAlchemy definitions of table schemas
tests: # External tests package
Top-level functions
Classes specifying table schemas:
- SiteSQL
- GenerationSQL
- ForecastSQL
- ForecastValueSQL
- LatestForecastValueSQL
- ClientSQL
- DatetimeIntervalSQL
- StatusSQL
Database connection objects:
- DatabaseConnection
Read package functions
Currently available functions accessible via from pvsite_datamodel.read import <func>
:
- get_pv_generation_by_client
- get_pv_generation_by_sites
- get_latest_forecast_values_by_site
- get_site_by_uuid
- get_site_by_client_site_id
- get_site_by_client_site_name
- get_all_sites
- get_latest_status
Write package functions
Currently available write functions accessible via from pvsite_datamodels.write import <func>
:
- insert_forecast_values
- insert_generation_values
Tests
To run tests use pytest
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
pvsite-datamodel-0.1.18.tar.gz
(13.8 kB
view hashes)
Built Distribution
Close
Hashes for pvsite_datamodel-0.1.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e256e8c4fd7445ecfbed536cbf2cae2f64dc8e1a319b6cda674d3b592e2d748 |
|
MD5 | af5a5a2d2ea6e557c128142f716d2dc7 |
|
BLAKE2b-256 | 96d67737f5b3085d68e86b7dd9c79f743751fb55f18c881840d47a9488baf6a2 |