Skip to content

Getting Started

Python installation

Python can be downloaded here.

For further information on how to install Python on your operating system :

Windows guide

Unix guide

OSx guide

On OSx you can also install Python through HomeBrew, which would also install pip along, to do so, you need to install HomeBrew and then run the following command : brew install python3

pip

pip is the standard package manager for Python. It allows you to install and manage additional packages that are not part of the Python standard library.

Install pip

On Windows

  • Download get-pip.py
  • Open your terminal (powershell, cmd, ...) and navigate to the folder containing get-pip.py
  • Run the following command : python get-pip.py
  • Pip is now installed

On Unix

Debian / Ubuntu:

sudo apt install python3-pip

CentOS / Rhel:

sudo yum install epel-release
sudo yum install python-pip

Fedora:

sudo dnf install python3

Arch Linux:

sudo pacman -S python-pip

openSUSE:

sudo zypper install python3-pip

On macOS:

Download get-pip.py and then run it

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

With Brew:

brew install python3

You can verify thatpip was installed properly by running the following command in your terminal : pip -V which should returns the version of the installed pip program.

Development

  1. Fork the package.

  2. Clone your forked repository.

git clone https://github.com/<githubusername>/python-client
  1. Next, move into the fresh cloned directory.
cd python-client
  1. The next step would be to create something like a virtual environment to ensure no name clashes occur.
  1. Create and enter the virtual environment
   # With virtualenv (on Unix and OSx)
   mkdir my-amazing-solar-project
   cd my-amazing-solar-project
   virtualenv virtualEnvName
   source venv/bin/activate

   # With virtualenv (on Windows)
   mkdir my-amazing-solar-project
   cd my-amazing-solar-project
   virtualenv virtualEnvName
   .\venv\Scripts\activate.bat
  1. Once inside the virtualenv, you can proceed to install the dependencies. These are listed inside the setup.py file.
   pip install \
      requests \
      backoff \
      flake8 \
      flake8-import-order \
      flake8-print \
      flake8-quotes \
      pytest \
      pytest-responses \
      pytest-mock \
      pytest-cov
  1. Dependencies are now installed, you can now run the tests to see if everything is running as it should.
pytest