Skip to main content

Introduction

Discord Build Status Code Style: Black

Command for cascading toml "databases" into their full objects

TOML cascades are file trees that define generic configuration. Cascading allows for shared setting to be set in one place.

The root of a cascade has two files that define it:

  • .cascade.toml defines settings for cascadetoml. Settings are:
    • paths a list of strings where each string is a python format-style string. These strings are used to pull out setting defined by the path.
  • <type>.template.toml defines the full structure of the resulting TOML object. <type> is used as the name for the array of tables output when a cascade results in multiple objects. The keys in the table are the only ones allowed in TOML files within the tree. The types of values must also be consistent.

Settings for a particular folder are in a TOML file with the folder name plus the .toml extension.

The first repo using this is the nvm.toml repo. Its only path is {technology}/{manufacturer}/{sku}.toml. A file such as flash/gigadevice/GD1.toml will have the implicit values:

technology = "flash"
manufacturer = "gigadevice"
sku = "GD1"

All of the other values come from these files in order:

  • flash/flash.toml
  • flash/gigadevice/gigadevice.toml
  • flash/gigadevice/GD1.toml

No key may exist at multiple levels.

cascadetoml check can be used to validate much of this.

Installing from PyPI

To install for current user:

pip3 install cascadetoml

To install system-wide (this may be required in some cases):

sudo pip3 install cascadetoml

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install cascadetoml

Installing for development

cascadetoml uses flit for packaging. To install a development copy into your current venv do:

flit install -s --deps develop

After install, you simply edit the files in place and the venv will use the source files directly.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Documentation

For information on building library documentation, please check out this guide.

Metadata

Release files for cascadetoml 0.3.3

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

Source distribution (sdist)

Source distribution for cascadetoml 0.3.3
File Size Uploaded
cascadetoml-0.3.3.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cascadetoml 0.3.3
File Interpreter ABI Platform
cascadetoml-0.3.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 22.7 kB

Release files / cascadetoml-0.3.3.tar.gz

Download URL cascadetoml-0.3.3.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c15dd247f83ec087a5f91fe80be832116abddde67bca28018aa5fa7a7be01387
BLAKE2b-256 checksum
How to use checksums
bdb30df5b3236d53b477bc63a9523dd65f84fa642a30ff8272bdd3f3f9b79c0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / cascadetoml-0.3.3-py2.py3-none-any.whl

Download URL cascadetoml-0.3.3-py2.py3-none-any.whl
Size 7.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b7259634c7654fd537cb2dbd095f6c50348c641e09b4f0a7d19c610ce466851c
BLAKE2b-256 checksum
How to use checksums
0ebc3cf8b583e6ac55ff1e659525b9ec07325be0552ba1aad26387060c83818e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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