🔍 Code Extractor

class WebInfoCreationInformation

Maturity: 26

WebInfoCreationInformation is a data transfer object class that inherits from ClientValue, used to encapsulate information required for creating web instances in Office 365/SharePoint operations.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/webs/info_creation_information.py
Lines:
4 - 5
Complexity:
simple

Purpose

This class serves as a value object for passing web creation parameters in Office 365 SharePoint API operations. It inherits from ClientValue which provides serialization capabilities for client-server communication. As a pass-through class with no additional implementation, it relies entirely on the parent ClientValue class functionality for property management and serialization. It is typically used to structure data when creating new SharePoint webs (subsites) through the Office 365 REST API.

Source Code

class WebInfoCreationInformation(ClientValue):
    pass

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

bases: Inherits from ClientValue, which provides the base functionality for client-side value objects that can be serialized and transmitted to SharePoint services. ClientValue typically handles property storage and JSON serialization.

Return Value

Instantiation returns a WebInfoCreationInformation object that can store properties dynamically (inherited from ClientValue). The object itself doesn't return values but serves as a container for web creation parameters that will be serialized when making API calls.

Class Interface

Attributes

Name Type Description Scope
Title str The title of the web to be created (dynamically set, inherited from ClientValue) instance
Url str The URL segment for the new web (dynamically set, inherited from ClientValue) instance
Description str Description of the web to be created (dynamically set, inherited from ClientValue) instance
Language int Language code for the web (e.g., 1033 for English) (dynamically set, inherited from ClientValue) instance
WebTemplate str SharePoint web template to use (e.g., 'STS#0' for Team Site) (dynamically set, inherited from ClientValue) instance
UseSamePermissionsAsParentSite bool Whether to inherit permissions from parent site (dynamically set, inherited from ClientValue) instance

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue
from office365.sharepoint.webs.web_info_creation_information import WebInfoCreationInformation

Usage Example

from office365.sharepoint.webs.web_info_creation_information import WebInfoCreationInformation
from office365.sharepoint.client_context import ClientContext

# Establish SharePoint context
ctx = ClientContext(site_url).with_credentials(credentials)

# Create web info object
web_info = WebInfoCreationInformation()
web_info.Title = "New Subsite"
web_info.Url = "newsubsite"
web_info.Description = "A new subsite for the project"
web_info.Language = 1033  # English
web_info.WebTemplate = "STS#0"  # Team Site template
web_info.UseSamePermissionsAsParentSite = True

# Use with SharePoint web collection
new_web = ctx.web.webs.add(web_info)
ctx.execute_query()

Best Practices

  • This class is a data container and should be instantiated with properties set dynamically as needed for web creation
  • Properties are typically set as attributes after instantiation (e.g., obj.Title = 'value') following the ClientValue pattern
  • The object should be passed to SharePoint web collection methods (like webs.add()) rather than used standalone
  • Always ensure required properties like Title, Url, and WebTemplate are set before passing to API methods
  • The class relies on ClientValue's dynamic property system, so any SharePoint-supported web creation property can be set
  • This is an immutable-style value object - create new instances rather than reusing for different operations
  • The object is serialized automatically by the Office 365 client library when making API calls

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class WebCreationInformation 82.8% similar

    A data transfer object (DTO) class that encapsulates metadata required for creating a new SharePoint site (web).

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/webs/creation_information.py
  • class SiteScriptCreationInfo 78.3% similar

    SiteScriptCreationInfo is a data transfer object class that inherits from ClientValue, used to encapsulate information required for creating site scripts in SharePoint/Office 365.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sitescripts/creation_info.py
  • class ContentTypeCreationInformation 74.5% similar

    A data transfer object that encapsulates properties required to create a new SharePoint content type, inheriting from ClientValue for serialization support.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/contenttypes/creation_information.py
  • class GroupCreationInformation_v1 74.0% similar

    A data class that encapsulates information required to create a SharePoint group, including display name, alias, visibility settings, and optional parameters.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/groups/creation_information.py
  • class WikiPageCreationInformation 74.0% similar

    A data class that encapsulates information required to create a wiki page in SharePoint, including the server-relative URL and HTML content.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/pages/wiki_page_creation_information.py
← Back to Browse