Skip to content

Data Contract


Overview

YAML Ain't Markup Language (YAML) is a data serialization language that is consistently listed as one of the most popular programming languages. It's often used as a format for configuration files, but its object serialization abilities make it a viable replacement for languages like JSON.

Current Version: As of May 2025, Drupal 10 is the recommended version, with Drupal 11 emerging. Drupal 7 is no longer supported (end-of-life January 5, 2025).


Python

Python is one of the most popular programming languages. It’s simple to use, packed with features and supported by a wide range of libraries and frameworks. Its clean syntax makes it beginner-friendly.

Current Version: As of October 2021, YAML 1.2 is the recommended version, with revision 1.2.2.

Python is used for:

  • Web Development (server side),
  • software development,
  • mathematics
  • System programming

What Python can do?

  • Python can be used on a server to create web applications
  • Python can be used alongside software to create workflows.
  • Python can connect to database systems. It can also read and modify files.
  • Python can be used to handle big data and perform complex mathematics.
  • Python can be used for rapid prototyping, or for production-ready software development.

Installation

The process is mentioned below for downloading and installing the latest version of Python.

  1. Download Python

  2. Choose the version of Python

    • Once you landed on the download page choose the Python Version
    • Click on the version you want to download
    • Python 3.13.4 (the latest stable release as of now is Python 3.13.4).

    Image title

    Fig 01: A screenshot of Python Downloads

  3. Download the Python installer

    • Once the download is complete, run the installer program. On Windows , it will typically be a .exe file, on macOS, it will be .pkg file, and on Linux, it will be .tar.gz file.
  4. Run Python Installer

    • Run the Python Installer for how to install Python on the Windows downloads folder.

    Image title

    Fig 02: A screenshot of Python isntaller

    • Make sure to mark Add Python to PATH otherwise you will have to do it explicitly. It will start installing Python on Windows.
    • After installation is complete click on Close . Bingo..!! Python is installed. Now go to Windows and type IDLE.
    • This is Python Interpreter also called Python Shell. I printed Hello geeks, python is working smoothly.
    • The three greater than >>> sign is called the Python command prompt, where we write our program and with a single enter key, it will give results so instantly.

Visual Studio

VS Code stands for Visual Studio Code, which is a free, open-source, and lightweight code editor developed by Microsoft. It’s widely used by developers for writing code in many programming languages.

Current version: As of May 2025, Drupal 10 is the recommended version, with Drupal 11 emerging. Drupal 7 is no longer supported (end-of-life January 5, 2025).

Key Features of VS Code:

  • Cross-platform: Works on Windows, macOS, and Linux.
  • Git integration: Source control built-in, with support for Git and GitHub.
  • Terminal: Integrated terminal for running commands without leaving the editor.
  • Remote Development: Support for working inside containers, WSL (Windows Subsystem for Linux), or remote servers.

Installations

The process is mentioned below for downloading and installing the latest version of VS Code.

  1. Download VS Code

    • Visit the VS Code Website and Navigate to the Downloads Section.

    Image title

    Fig 03: A screenshot of VSCode downloads

    • Click on Download based on your requirement. For demo purpose we are using Windows version (should auto-detect your OS).
    • Once downloaded, run the installer (VSCodeUserSetup-x64-x.x.x.exe).
    • During setup:
      • Accept the license agreement
      • Choose the install location
      • Recommended: Check these boxes:
        • “Add to PATH”
        • Register Code as an editor for supported file types”
        • “Add ‘Open with Code’ action to Windows Explorer
    • Click Install, then Finish.
    • Launch VS Code from the Start Menu or desktop shortcut.

Install Microsoft C++ Build Tools

The process is mentioned below for downloading and installing the latest version.

  1. Download VS Code

    Image title

    Fig 04: A screenshot of VSCode downloads

    • Once downloaded, run the installer.
    • Double-click the file to launch the installer.
    • Click Install, then Finish.
    • Launch VS Code from the Start Menu or desktop shortcut.

Install PIP

The process is mentioned below for downloading and installing the latest version.

  1. Verify Python is install.

    python --version
    

    If Python is install, then you will result something like shown below. Otherwise follow the instruction to install Python mentioned above.

    Python 3.13.14
    
  2. Open Command Prompt (cmd) by searching Windows menu or using Win + R.

    • Select 'Run as administrator'

    Image title

    Fig 05: Command Prompt - Run as Administrator

  3. Download PIP from get-pip.py https://bootstrap.pypa.io/get-pip.py.

  4. Execute the command to install pip.

    python get-pip.py
    
  5. Verify the PIP installation

    pip -Vorpip --version
    
    6. Run this command in terminal

    pip3 install "datacontract-cli[all]”
    
  6. Add these lines in to system variables in Environment variables

    DATACONTRACT_POSTGRES_PASSWORD      insurgence
    DATACONTRACT_POSTGRES_USERNAME      insurgencemodel
    

    Image title

    Fig 06: System variables.

  7. Run this command in terminal

    datacontract lint app\datacontract.insurance.yaml
    

    Now, run this command

    datacontract lint app\datacontract.base.yaml
    
  8. Run the command in terminal

    datacontract test app\datacontract.insurance.yaml
    

    Now, run this command

    datacontract test app\datacontract.base.yaml
    
  9. Now to convert 'yaml' file into a 'html' file, run the following command

    datacontract export --format html app\datacontract.insurance.yaml
    
    Now, run this command

    datacontract export --format html app\datacontract.insurance.yaml > datacontract.insurance.html
    

Managing Users

  • Add Users:
    • Go to People -- Add user.
    • Assign roles (e.g., Administrator, Editor).
  • Permissions
    • Configure at People -- Permissions.

Multilingual Setup

  • Enable modules: Language, Content Translation, Interface Translation, Configuration Translation (Extend).
  • Add languages at Configuration -- Regional and language -- Languages.
  • Translate content at Content -- Translate.

Best Practices

  • Use Composer for dependency management to avoid update issues.
  • Regularly update core and modules for security.
  • Test changes in a local/staging environment (e.g., DDEV).
  • Use strong passwords for admin accounts and databases.
  • APIs and Flexibility: APIs enable integration with decoupled front-ends and custom workflows.
  • Monitor security advisories: https://www.drupal.org/security.