Python Programs

Calculator

prog_lang_integration.python.calc.add(a, b)[source]

Add two arguments

Parameters:

a – first parameter

Simple Example

This is a module for data models.

class prog_lang_integration.python.sphinx_example.User(name, email)[source]

Represents a user in the system.

greet()[source]

Returns a greeting.

prog_lang_integration.python.sphinx_example.get_user_count()[source]

Returns the total number of users.

More Complex Example

A module for data processing and analysis.

class prog_lang_integration.python.data_processing.DataAnalyser(dataset)[source]

A class to perform analysis on datasets.

Parameters:

dataset (list) – The dataset for analysis.

get_max_value()[source]

Returns the maximum value from the dataset.

get_min_value()[source]

Returns the minimum value from the dataset.

prog_lang_integration.python.data_processing.create_report(title, sections)[source]

Creates a simple report from a title and a list of sections.

This function demonstrates a list being a parameter and is part of a larger system.

Parameters:
  • title (str) – The title of the report.

  • sections (list) – A list of strings, where each string is a report section.

Returns:

The full report as a formatted string.

Return type:

str

prog_lang_integration.python.data_processing.my_function()[source]

This is a function demonstrating an image in its docstring.

Diagram of my_function

A diagram illustrating the workflow of my_function.

This will be added to your index.

prog_lang_integration.python.data_processing.process_data(data, filter_value=None)[source]

Processes a list of data points.

Parameters:
  • data (list) – The list of data points to process.

  • filter_value (int, optional) – An optional value to filter the data.

Returns:

A new list with processed data.

Return type:

list

This section provides a visual example of data and its processing.

Here’s a list of things you can do with this module: