Skip to main content

PV_self-consumption API client

Project description

PV_self_consumption_client

Authors: Sébastien Gardoll, IPSL, CNRS / Sorbonne Université Olivier Boucher, IPSL, CNRS / Sorbonne Université

(c) 2024

Interface to call API PV_self_consumption_client for optimising solar PV self-consumption under constraints. Note that the license only applies to this interface and not to the API itself.

Installation

Option 1: Conda

  1. Install miniconda;
  2. Create a new conda environment;
  3. Install the project dependencies.

Skip 1. if you already have a miniconda/anaconda distribution installed (which conda doesn't return an error).

Install miniconda

While installing, Miniconda asks you to initialize itself. If you choose to do so, it will add some instructions to your ~/.bashrc (shell configuration). Carefully choose the path of the Miniconda installation directory, as conda environment take some space and inodes. The following example is meant for Linux x86_64.

curl -sSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh

Conda environment creation

Let's create a conda environment called pvsc:

conda create -y -n pvsc 'python=3.12.*'

Install client

First activate the environment (as usual), then install the client with pip:

conda activate pvsc
pip install -U pv_self_consumption_api_client

Run client

In any directory:

pvsc -h

Option 2: PDM

PDM associates a Python virtual environmnent (venv) with a project described by a pyproject file.

Dependencies installation

Setup the project environment with PDM:

git clone https://github.com/OB-IPSL/PV_self_consumption_client.git
cd PV_self_consumption_client
pdm install

Run client

While in PV_self_consumption_client directory:

pdm pvsc -h

Getting started

Note: Add pdm command before pvsc while in the source directory if you installed the client with pdm (option 2).

Generate example input files

pvsc example -p > params.yml
pvsc example -d > demand.csv

The example input files can be modified for your own usages.

Run optimization

Compute optimization then output in and also generate plots (-m option):

pvsc optimize -m params.yml demand.csv

How to contribute

Install linters

You must follow the pdm install instructions. Then:

pdm install -dG dev
pdm run pre-commit install

Submit pull request

Contribution is possible thank to the PR submission.

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

pv_self_consumption_api_client-0.1.4.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pv_self_consumption_api_client-0.1.4.tar.gz.

File metadata

File hashes

Hashes for pv_self_consumption_api_client-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f97410d5633a0415cb339e96deaf787d1a2e6a158ba576b240303367bdb155ab
MD5 5c5f98ba7e818a18aeb666a746a24a8b
BLAKE2b-256 431a6c5ed9f011d7e1b79fc2d4396a481be8b133b2daed6676ddb5e17f746ae4

See more details on using hashes here.

File details

Details for the file pv_self_consumption_api_client-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pv_self_consumption_api_client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a9c70babdba55959ba282ca792915913474fa6c132777513007b2c7f295533ec
MD5 d843590a3f281a2fb40bbf480548c942
BLAKE2b-256 717b4741db5a344726894a318e963fed7a56aa45d4d3f9645abd4e824b2cb7ab

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