Skip to main content
# winnow

Winnow is a json interchange format for publishing families of configurable products. It has several distinct parts:

+ A set of json schemata for documents describing products and associated information.
+ A schema for defining sets of configuration options in products.
+ A defined set of basic logical operations for manipulating documents with options.
+ A python library that implements these operations

In order to write and publish winnow documents you use the first two of these as they define how winnow documents are constructed. To apply logical operations to, and manipulate, winnow documents you will need to understand winnow's operations and it's library that implements them.


## resources and documents

Some winnow documents describe named resources others do not.

Resource documents have certain features: they are discoverable at a permanent url defined in the document itself; they are versioned and use Semantic Version numbers; these versions are themselves discoverable and resources may inherit from another resource of the same type.

Eight resource types are currently defined in winnow. Follow links to see their full descriptions.

+ [*range*](docs/range.md) - A collection of related designs with common authorship
+ [*design*](docs/design.md) - A design
+ [*product*](docs/product.md) - A family of versions of a design defined by a common set of options
+ [*fileset*](docs/fileset.md) - A set of files that are useful for making all or a subset of a product family
+ *finish* - A finish for a product defined by a set of materials and processes
+ *material* - A material
+ *process* - A process that is applied to a material
+ *context* - An collection of options used to filter or extend a product's options

Winnow also defines two document types that are not named resources, but are created as intermediate files during processing:

+ *choice*
+ *quantified_configuration*

## validation

In winnow.schemata there are json schemata that can be used to validate winnow documents. This can be done using tools available from [json-schema.org](http://json-schema.org/implementations.html), or using winnow's python library like this:

```python
with open(filepath, "r") as f:
doc = json.loads(f.read())
winnow.validate(doc)
```

## options

Some winnow documents have a top level ```options``` attribute. This object describes a related family of products by defining a set of possible configurations for a product, for example available colours or sizes.

```json
{
"options":{
"colour": ["red", "blue", "green"],
"size": ["big", "small],
"wheels": [4, 6]
}
...
}
```

This describes the product family for a toy that comes in three colours, two sizes and can have either four or six wheels. Winnow provides both a json language for defining these options and a set of operations for manipulating them.

You can read more about winnow's values here [options](docs/options.md)

## operations

Winnow defines a set of simple, but powerful, operations to help manipulate winnow documents.

+ *add_doc*
+ *allows*
+ *merge*
+ *scope*
+ *default_choices*
+ *quantify*
+ *filter_allows*
+ *filter_allowed_by*
+ *is_allowed_by*
+ *expand*
+ *asset_props*
+ *validate*

## library





Release files for winnow 0.1.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 winnow 0.1.4
File Size Uploaded
winnow-0.1.4.tar.gz 40.2 kB Details

Release files / winnow-0.1.4.tar.gz

Download URL winnow-0.1.4.tar.gz
Size 40.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1c6147aaeec22599d1357b56d958e3f4f578c2296aa2cdde9abcd408ee3d9919
BLAKE2b-256 checksum
How to use checksums
03d8df7039ef09d5171d72b65cc318180eb9de91035de79f5fa572b3efd7e0da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

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