Skip to main content

YAML Project Configuration Reader

Who needs this module?

Any developer who is developing an application that has to be configured through text files. If you can call a set of such configurations "a project", this module might be for you.

Example

  • Your application is a code generator.
  • The users of your application should be able to decide how the code is generated for different projects.
  • It can generate code automatically for many languages. You decided that each language would be a plugin of your software.
  • Depending on different conditions, the code must contain some stuff or not (comments, optimizations, verbose content...). It seems you have different contexts
  • You would like to have an easy way to define what a project of your application is regarding all possible configurations, like:
    • User wants to generate MATLAB and C code in a project, for debug and release. And for debug it has to generate the development documentation too.
    • This user also wants to generate Python, Node.js and Dockerfiles, for development and release. Roll-out credentials and URLs are different for each context.

What is a project?

When developing an application, sometimes it is worth to define a project as the entity that our software will work with.

A project is a set of files with a known format and arranged in a known set of folders.

It is defined by a path where the root of such file structure is saved.

What provides this module?

  1. This module provides a convention about how to arrange your project files and a Python API to read that set of files.
  2. It will apply a logic about how plugin and context configurations have to be merged into a single configuration object.

What does this module not provide?

This module does not tell you what configuration attributes you need in your projects, or what plugins or contexts. You have to decide if the structure of plugins + contexts suits your software and decide where to put what. Then, using the module, you can just call an API function and get a full object where you can read all the attributes you need.

Contexts

A context is a set of conditions which relate to different ways to run for your application. Think of debug or release in classic development. Or development and production when rolling-out.

Plugins

A plugin is an optional piece of your application that needs to be configured in each project. The plugin configurations are most of the time the same within a project.

Think of a report generator plugin; your application does whatever logic with the project and has the option to generate reports. Such reports need a format, an output folder, maybe some conventions, a language...These are plugin configurations and they almost do not change, regardless of the context.

Overrides

Contexts can, sometimes, override plugin configurations for specific tasks. It is not common, but this module provides an easy way to do this.

Configs

Configs are mixes of one context and one or more plugins configurations. Your application will probably:

  1. Ask for the defined configs in the project
  2. Choose one of them
  3. Call the YAMLProject API to retrieve the merged configuration from the chosen config
  4. Pass the merged object to your logic so values can be used to modify the behavior

This module

This module creates a structure in memory from a set of YAML files that define a configuration for a project. A project is an abstract concept modeled as a set of files and folders that is going to be read/written by some software. The structure of a project is:

  • A root set of attributes defined at root.yaml. For example: a name, a description, etc.
  • A set of plugin configurations. The application processing your project can have plugins. The project configuration provides

Release files for YAML-Project-Loader 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for YAML-Project-Loader 0.0.4
File Size Uploaded
YAML_Project_Loader-0.0.4.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for YAML-Project-Loader 0.0.4
File Interpreter ABI Platform
YAML_Project_Loader-0.0.4-py2-none-any.whl Python 2 none any Details

Total release size: 11.2 kB

Release files / YAML_Project_Loader-0.0.4.tar.gz

Download URL YAML_Project_Loader-0.0.4.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
584e6200bc4bf3f6acd498cf0bc9b985e1c617930c6d7351276bf7053302f59e
BLAKE2b-256 checksum
How to use checksums
f7eeafad788d55c79a85cc1ce6cafa4da4e66dc75a0af03f0f8b7fff4bc9247b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / YAML_Project_Loader-0.0.4-py2-none-any.whl

Download URL YAML_Project_Loader-0.0.4-py2-none-any.whl
Size 5.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
dbc343151eadd9bd6843b93fad81d760afa3fdf95cd2820184f559c2928ed85b
BLAKE2b-256 checksum
How to use checksums
8fefbdd9c9a3d694ff8d89d8c52c37c552823724b041a9073d38d91f1ed806b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page