• User Guide
  • Calculation
  • Automation
  • Web API
  • Validation
  • Contact Us
Search Results for

    Show / Hide Table of Contents
    • Introduction
      • Acquiring your API token
      • Endpoints on API website
      • View API schema
      • SolarFarmer API versions
    • –––––––––––––––––––
    • Endpoints
      • 'About' endpoint
      • 'SolarPosition' endpoint
      • 'ModelChain' endpoint
      • 'ModelChainAsync' endpoint
      • 'Service' endpoint
      • 'TerminateModelChainAsync' endpoint
    • Tutorials
      • Introduction
      • Python environment
      • Generate input files from desktop
      • 'About' endpoint tutorial
      • 'SolarPosition' endpoint tutorial
      • 'ModelChain' endpoint tutorial
      • 'ModelChainAsync' endpoint tutorial
      • 'Service' endpoint tutorial
      • 'TerminateModelChainAsync' endpoint tutorial
    • –––––––––––––––––––
    • Troubleshooting
      • Common Problems
      • Validation Service
    • API Class References
      • SolarFarmerApi.Client
        • AnnualEnergyYieldResults
        • DiffuseModel
        • EnergyCalculationInputs
        • EnergyCalculationOptions
        • EnergyYieldResults
        • EnergyYieldResultsForMonth
        • EnumTechnology
        • IAMModelType
        • IAMModelTypeForOverride
        • IAMParameters
        • IndexedObject3D
        • Inverter
        • InverterEfficiencyModelType
        • InverterEfficiencyPoints
        • InverterInput
        • InverterSpecification
        • Layout
        • Location
        • LossTreeEffects
        • LossTreeEntry
        • LossTreeResultForMonth
        • MeteorologicalCondition
        • MeteorologicalConditionsDataset
        • MiniSimpleTerrainDto
        • MissingMetDataMethod
        • ModelChainAsyncQueryResponse
        • ModelChainResponse
        • ModuleGeometry
        • ModuleIndexRange
        • ModuleSpecification
        • ModuleString
        • MountingTypeSpecification
        • MpptLimits
        • PanFileSupplements
        • PointInLossChain
        • ProblemDetails
        • PVPlant
        • PVsystDiodeModelParameters
        • QuadDouble
        • Rack
        • Response
        • Response2
        • Response3
        • RuntimeStatus
        • SimpleTerrainDto
        • SolarPositionDto
        • SolarPositionRequest
        • SolarPositions
        • SystemAttributes
        • TerrainRowDto
        • TerrainRowStartEndColumnsDto
        • ThreeEfficiencyCurves
        • Tracker
        • TrackerSystem
        • Transformer
        • TransformerLossModelTypes
        • TransformerSpecification
        • Vector3Double
    • Release Notes
      • API v2 (2.0.2) (7 September 2023)
      • API v1 (0.2.254) (11 April 2023)
      • API 0.2.249 (22 November 2022)
      • API 0.2.242 (28 July 2022)
      • API 0.2.223 (3 March 2022)
      • API 0.2.64 (23 August 2021)
      • API 0.2.51 (2 June 2021)

    Setting up a Python environment for the tutorials

    These tutorials use the Python scripting language (see https://www.python.org/). You can call the web API using any language you like as long as it supports calls to web APIs.

    Install Python on your machine:

    • Download the latest Python installer from https://www.python.org/downloads/
    • Some useful instructions also here: https://realpython.com/installing-python/, https://docs.microsoft.com/en-us/windows/python/beginners

    Set up a development environment

    You can edit Python files in all text editors, but using an integrated development environment (IDE) means you can take advantage of things like intellisense, error checking, debug support, etc.

    • Visual Studio Code is a free IDE that is a good place to start. Download from https://code.visualstudio.com/
    • You could also run the tutorials from a Jupyter notebook (https://jupyter.org/). These can be a really useful interactive development environment so worth trying too.

    Install additional Python libraries

    You'll also need the requests (for sending HTTP requests) and pandas (for analysing data) libraries installing. Once you have Python installed, run the following two commands in a command prompt to install these libraries.

    • python -m pip install requests
    • python -m pip install pandas

    Using other scripts and programming languages

    The example tutorials are written in Python. However, if you are familiar with other scripts or languages, and they support calls to web APIs, you are of course free to use these and use the Python examples as a guideline.

    You can download the C# client code from the link at the top of https://solarfarmer.dnv.com/docs. This can be used to help you build C# applications that use the API.

    In This Article
    Back to top DNV SolarFarmer Home