Python Client#

This guide provides step-by-step instructions for setting up a Python virtual environment for developing and running a Dlubal API client. Using a virtual environment helps isolate dependencies and manage your Python projects efficiently.

Prerequisites#

Before starting, ensure your system meets the following requirements:

  1. Installed Python programming langugage (version 3.10 or later).

    • Verify the installation by running:

      python --version
      
  2. Installed Visual Studio Code as your code editor:

    • Verify the installation by running:

      code --version
      
  3. Installed Python Extension in VS Code:

    • Open the Extensions view by pressing Ctrl+Shift+X.

    • Search for Python and click on Install.

Setup Virtual Environment#

Follow these steps to create and configure a Python virtual environment for your project:

  1. Create the Virtual Environment:

    • Open a terminal in your project folder and run:

      python -m venv myenv
      
    • This creates a virtual environment named myenv in your project directory.

  2. Activate the Virtual Environment:

    • Activate the environment depending on your operating system:

      • On Windows:

        myenv\Scripts\activate
        
    • You should see (myenv) in your terminal, indicating the environment is active.

Install the Dlubal API Package#

  1. Install the Dlubal API Package:

    • Install the Dlubal API using pip:

      pip install dlubal.api
      
    • To install a specific version, use:

      pip install dlubal.api==<version>
      

    Replace <version> with the desired version number (e.g., 2.9.4). The last two numbers in the version relate to the Dlubal App version, in the format X.09.0004.

  2. Verify the Installation:

    • Verify that the Dlubal API is installed correctly by running:

      pip list | grep dlubal