Package Structure & Configuration

In CODED FLOWS, a package is a collection of Python functions called Bricks, which should ideally focus on a specific technical domain, expertise, or a set of related functionalities. Examples include package for image processing, machine learning, or quantitative analysis.

Packages are for compounding!

Packages enable you to build and share your technical expertise! Always design them with reusability in mind, allowing you and others to leverage and expand upon your work.


Package Structure

A CODED FLOWS package is structured as follows (Quickstart Repo):

/
├── package.yaml
├── LICENSE
├── README.md
├── Bricks/
│   ├── brick_name1.py
│   ├── brick_name2.py
│   └── ... (other Python scripts)
└── Docs/
    ├── brick_name1.md
    ├── brick_name2.md
    ├── ... (other Markdown files)
    └── images/
        ├── image1.png
        ├── image2.jpg
        └── ... (other image files)
  • package.yaml: The YAML configuration file for the package, containing metadata such as version, display name, requirements, package icon, and more.
  • README.md: The main page for the package, displayed in the CODED FLOWS packages repository if you choose to publish it on our platform.
  • LICENSE: All public packages shared in the CODED FLOWS packages repository require an MIT license file. Private packages, available to pro users, do not require a license file.
  • Bricks: The primary folder containing all Python files representing the package's Bricks. Each Brick file must be named identically to the Brick function it contains, and every Python file must be self-contained, with no dependencies on other files. For more details, see the next section Adding Function Bricks.
  • Docs: Contains documentation for each Brick as a markdown. For more information, refer to the Documenting Packages section.

The case of local packages

If you plan to load the created package locally without using the CODED FLOWS packages repository, there is no need to include documentation or a license file unless required for your own use.

Package Configuration

The package.yaml file is the configuration file for a CODED FLOWS package, defining its metadata, dependencies, and compatibility settings.

Below is an example of a YAML configuration for a CODED FLOWS package designed for managing files and folders:

name: Files & Folders Management
pname: files_and_folders
description: 'file and folder operations: create, move, copy, rename, delete, zip/unzip.'
version: 0.2.12
icon: folder-filled
private: false
python:
  - '3.10'
  - '3.11'
  - '3.12'
  - '3.13'
requirements:
  - py7zr

name

The display name of the package, between 3 and 50 characters.

pname

The pythonic name of the package, typically used for internal referencing inside the generated scripts. A maximum of 50 characters.

description

A brief description of the package’s purpose or functionality, displayed in the package repository to inform users about its use case. A maximum length of 200 characters.

version

The version number of the package, following semantic versioning (e.g., MAJOR.MINOR.PATCH). This tracks updates.

icon

The icon associated with the package, used for visual representation in the CODED FLOWS platform. We use the icon values of tabler.io.

private

Indicates whether the package is public (false, default value) or private (true). A false value means the package is shared with all the CODED FLOWS users and requires an MIT license file for public distribution.

python

A list of supported Python versions for the package (we support 3.10, 3.11, 3.12 and 3.13). If this parameter is omitted, it is assumed that all Python versions are supported.

requirements

A list of Python libraries required for the package to function. You can define the requirements at the package level, applying to all its Bricks, or specify requirements for each Brick individually by adding metadata to the Brick (more details in the next section).