Name | datazen JSON |
Version |
3.1.4
JSON |
| download |
home_page | https://github.com/vkottler/datazen |
Summary | Compile and render schema-validated configuration data. |
upload_time | 2023-10-05 23:58:45 |
maintainer | |
docs_url | None |
author | Vaughn Kottler |
requires_python | >=3.10 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<!--
=====================================
generator=datazen
version=3.1.4
hash=fd1a16159a70c17239bad87ae8b0de27
=====================================
-->
# datazen ([3.1.4](https://pypi.org/project/datazen/))
[![python](https://img.shields.io/pypi/pyversions/datazen.svg)](https://pypi.org/project/datazen/)
![Build Status](https://github.com/vkottler/datazen/workflows/Python%20Package/badge.svg)
[![codecov](https://codecov.io/gh/vkottler/datazen/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/github/vkottler/datazen)
![PyPI - Status](https://img.shields.io/pypi/status/datazen)
![Dependents (via libraries.io)](https://img.shields.io/librariesio/dependents/pypi/datazen)
*Compile and render schema-validated configuration data.*
## Documentation
### Generated
* By [sphinx-apidoc](https://vkottler.github.io/python/sphinx/datazen)
(What's [`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html)?)
* By [pydoc](https://vkottler.github.io/python/pydoc/datazen.html)
(What's [`pydoc`](https://docs.python.org/3/library/pydoc.html)?)
## Python Version Support
This package is tested with the following Python minor versions:
* [`python3.10`](https://docs.python.org/3.10/)
* [`python3.11`](https://docs.python.org/3.11/)
* [`python3.12`](https://docs.python.org/3.12/)
## Platform Support
This package is tested on the following platforms:
* `ubuntu-latest`
* `macos-latest`
* `windows-latest`
# Introduction
Good software is composable and configurable, but
the complexity of managing configuration data scales with its complexity.
This package simplifies data curation and partitioning for uses in rendering
templates, or just rendering final sets of serialized data.
# Manifest Schema Reference
* [Default Directories](#default-directories)
* [Manifest Includes](#manifest-includes)
* [Output Directory](#output-directory)
* [Cache Directory](#cache-directory)
* [Global Loads](#global-loads)
* [Manifest Parameters](#manifest-parameters)
* [Default Target](#default-target)
* [Compiles](#compiles)
* [Commands](#commands)
* [Renders](#renders)
* [Groups](#groups)
# Usage
```
$ ./venv3.11/bin/dz -h
usage: dz [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
[--line-ending {unix,dos,unix}] [-m MANIFEST] [-c] [--sync] [-d]
[targets ...]
Compile and render schema-validated configuration data.
positional arguments:
targets target(s) to execute
options:
-h, --help show this help message and exit
--version show program's version number and exit
-v, --verbose set to increase logging verbosity
-q, --quiet set to reduce output
--curses whether or not to use curses.wrapper when starting
--no-uvloop whether or not to disable uvloop as event loop driver
-C DIR, --dir DIR execute from a specific directory
--line-ending {unix,dos,unix}
line-ending option to use by default (default: 'unix')
-m MANIFEST, --manifest MANIFEST
manifest to execute tasks from (default:
'manifest.yaml')
-c, --clean clean the manifest's cache and exit
--sync sync the manifest's cache (write-through) with the
state of the file system before execution
-d, --describe describe the manifest's cache and exit
```
# Manifest Schema
A manifest is provided to `datazen` to establish the set of targets
that should be executed based on defaults or the command-line invocation.
## Default Directories
A boolean flag specifying whether or not to load directories relative
to the current manifest file that coincide with names of load-able
data types (e.g. "configs" loaded as configs, "variables" loaded as
variables). By default these are loaded into the global namespace.
Setting this false will not automatically load these directories.
```
default_dirs:
type: boolean
default: true
```
## Manifest Includes
Include additional files to build the final, root manifest with.
This same schema applies to included files.
```
includes: paths
```
## Output Directory
Override the default output directory (i.e. `datazen-out`).
```
output_dir:
type: string
```
## Cache Directory
Override the default cache directory (i.e. `.manifest_cache`).
```
cache_dir:
type: string
```
## Global Loads
For each of these keys, add paths that should be loaded globally.
```
configs: paths
schemas: paths
schema_types: paths
templates: paths
variables: paths
```
## Manifest Parameters
Manifests themselves are
[Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates that are
rendered with the data contained in this key.
```
params:
type: dict
```
## Default Target
The target to execute by default if none is provided.
```
default_target:
type: string
```
## Compiles
Target definitions for compilation tasks.
```
compiles:
type: list
schema:
type: dict
schema:
configs: paths
schemas: paths
schema_types: paths
variables: paths
dependencies: deps
name:
type: string
key:
type: string
override_path:
type: string
output_type:
type: string
output_path:
type: string
output_dir:
type: string
index_path:
type: string
merge_deps:
type: boolean
default: false
append:
type: boolean
```
## Commands
Target definitions for command-line command tasks.
```
commands:
type: list
schema:
type: dict
schema:
file:
type: string
name:
type: string
command:
type: string
force:
type: boolean
replace_newlines:
type: boolean
arguments: deps
dependencies: deps
```
## Renders
Target definitions for render tasks. Renders can create output files
based on [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates,
or just String data to be used as a dependency for another task.
```
renders:
type: list
schema:
type: dict
schema:
templates: paths
children: deps
child_delimeter:
type: string
child_indent:
type: integer
dependencies: deps
name:
type: string
override_path:
type: string
as:
type: string
key:
type: string
output_dir:
type: string
output_path:
type: string
no_dynamic_fingerprint:
type: boolean
no_file:
type: boolean
indent:
type: integer
template_dependencies:
type: list
schema:
type: string
```
## Groups
Target definitions for group tasks. Groups declare a set of dependencies
and nothing else. Groups can be used as dependencies for any other target.
```
groups:
type: list
schema:
type: dict
schema:
name:
type: string
dependencies: deps
```
# Manifest Schema Types
These items may appear in the manifest schema.
## deps
Dependencies are lists of Strings.
They should be formatted as `(compiles,renders,...)-target`.
```
type: list
schema:
type: string
```
## paths
Paths are lists of Strings and can use `/` or `\\` as delimeters.
Paths are relative to the directory that a manifest file is in, but for
manifest includes, all "loaded" directories are relative to the root
manifest's directory. Paths can also be absolute.
```
type: list
schema:
type: string
```
# Internal Dependency Graph
A coarse view of the internal structure and scale of
`datazen`'s source.
Generated using [pydeps](https://github.com/thebjorn/pydeps) (via
`mk python-deps`).
![datazen's Dependency Graph](im/pydeps.svg)
*This entire document is generated by this package.*
Raw data
{
"_id": null,
"home_page": "https://github.com/vkottler/datazen",
"name": "datazen",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Vaughn Kottler <vaughnkottler@gmail.com>",
"keywords": "",
"author": "Vaughn Kottler",
"author_email": "Vaughn Kottler <vaughnkottler@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/c7/e9/4e2708e8b63ee550da775a2850b2e4c8b144f3eb88e06cb5a2b79c389ef5/datazen-3.1.4.tar.gz",
"platform": null,
"description": "<!--\n =====================================\n generator=datazen\n version=3.1.4\n hash=fd1a16159a70c17239bad87ae8b0de27\n =====================================\n-->\n\n# datazen ([3.1.4](https://pypi.org/project/datazen/))\n\n[![python](https://img.shields.io/pypi/pyversions/datazen.svg)](https://pypi.org/project/datazen/)\n![Build Status](https://github.com/vkottler/datazen/workflows/Python%20Package/badge.svg)\n[![codecov](https://codecov.io/gh/vkottler/datazen/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/github/vkottler/datazen)\n![PyPI - Status](https://img.shields.io/pypi/status/datazen)\n![Dependents (via libraries.io)](https://img.shields.io/librariesio/dependents/pypi/datazen)\n\n*Compile and render schema-validated configuration data.*\n\n## Documentation\n\n### Generated\n\n* By [sphinx-apidoc](https://vkottler.github.io/python/sphinx/datazen)\n(What's [`sphinx-apidoc`](https://www.sphinx-doc.org/en/master/man/sphinx-apidoc.html)?)\n* By [pydoc](https://vkottler.github.io/python/pydoc/datazen.html)\n(What's [`pydoc`](https://docs.python.org/3/library/pydoc.html)?)\n\n## Python Version Support\n\nThis package is tested with the following Python minor versions:\n\n* [`python3.10`](https://docs.python.org/3.10/)\n* [`python3.11`](https://docs.python.org/3.11/)\n* [`python3.12`](https://docs.python.org/3.12/)\n\n## Platform Support\n\nThis package is tested on the following platforms:\n\n* `ubuntu-latest`\n* `macos-latest`\n* `windows-latest`\n\n# Introduction\n\nGood software is composable and configurable, but\nthe complexity of managing configuration data scales with its complexity.\n\nThis package simplifies data curation and partitioning for uses in rendering\ntemplates, or just rendering final sets of serialized data.\n\n# Manifest Schema Reference\n\n* [Default Directories](#default-directories)\n* [Manifest Includes](#manifest-includes)\n* [Output Directory](#output-directory)\n* [Cache Directory](#cache-directory)\n* [Global Loads](#global-loads)\n* [Manifest Parameters](#manifest-parameters)\n* [Default Target](#default-target)\n* [Compiles](#compiles)\n* [Commands](#commands)\n* [Renders](#renders)\n* [Groups](#groups)\n\n# Usage\n\n```\n$ ./venv3.11/bin/dz -h\n\nusage: dz [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]\n [--line-ending {unix,dos,unix}] [-m MANIFEST] [-c] [--sync] [-d]\n [targets ...]\n\nCompile and render schema-validated configuration data.\n\npositional arguments:\n targets target(s) to execute\n\noptions:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -v, --verbose set to increase logging verbosity\n -q, --quiet set to reduce output\n --curses whether or not to use curses.wrapper when starting\n --no-uvloop whether or not to disable uvloop as event loop driver\n -C DIR, --dir DIR execute from a specific directory\n --line-ending {unix,dos,unix}\n line-ending option to use by default (default: 'unix')\n -m MANIFEST, --manifest MANIFEST\n manifest to execute tasks from (default:\n 'manifest.yaml')\n -c, --clean clean the manifest's cache and exit\n --sync sync the manifest's cache (write-through) with the\n state of the file system before execution\n -d, --describe describe the manifest's cache and exit\n\n```\n\n# Manifest Schema\n\nA manifest is provided to `datazen` to establish the set of targets\nthat should be executed based on defaults or the command-line invocation.\n\n## Default Directories\n\nA boolean flag specifying whether or not to load directories relative\nto the current manifest file that coincide with names of load-able\ndata types (e.g. \"configs\" loaded as configs, \"variables\" loaded as\nvariables). By default these are loaded into the global namespace.\n\nSetting this false will not automatically load these directories.\n\n\n```\ndefault_dirs:\n type: boolean\n default: true\n```\n## Manifest Includes\n\nInclude additional files to build the final, root manifest with.\nThis same schema applies to included files.\n\n\n```\nincludes: paths\n```\n## Output Directory\n\nOverride the default output directory (i.e. `datazen-out`).\n\n```\noutput_dir:\n type: string\n```\n## Cache Directory\n\nOverride the default cache directory (i.e. `.manifest_cache`).\n\n```\ncache_dir:\n type: string\n```\n## Global Loads\n\nFor each of these keys, add paths that should be loaded globally.\n\n```\nconfigs: paths\nschemas: paths\nschema_types: paths\ntemplates: paths\nvariables: paths\n```\n## Manifest Parameters\n\nManifests themselves are\n[Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates that are\nrendered with the data contained in this key.\n\n\n```\nparams:\n type: dict\n```\n## Default Target\n\nThe target to execute by default if none is provided.\n\n```\ndefault_target:\n type: string\n```\n## Compiles\n\nTarget definitions for compilation tasks.\n\n```\ncompiles:\n type: list\n schema:\n type: dict\n schema:\n configs: paths\n schemas: paths\n schema_types: paths\n variables: paths\n dependencies: deps\n name:\n type: string\n key:\n type: string\n override_path:\n type: string\n output_type:\n type: string\n output_path:\n type: string\n output_dir:\n type: string\n index_path:\n type: string\n merge_deps:\n type: boolean\n default: false\n append:\n type: boolean\n```\n## Commands\n\nTarget definitions for command-line command tasks.\n\n```\ncommands:\n type: list\n schema:\n type: dict\n schema:\n file:\n type: string\n name:\n type: string\n command:\n type: string\n force:\n type: boolean\n replace_newlines:\n type: boolean\n arguments: deps\n dependencies: deps\n```\n## Renders\n\nTarget definitions for render tasks. Renders can create output files\nbased on [Jinja](https://jinja.palletsprojects.com/en/2.11.x/) templates,\nor just String data to be used as a dependency for another task.\n\n\n```\nrenders:\n type: list\n schema:\n type: dict\n schema:\n templates: paths\n children: deps\n child_delimeter:\n type: string\n child_indent:\n type: integer\n dependencies: deps\n name:\n type: string\n override_path:\n type: string\n as:\n type: string\n key:\n type: string\n output_dir:\n type: string\n output_path:\n type: string\n no_dynamic_fingerprint:\n type: boolean\n no_file:\n type: boolean\n indent:\n type: integer\n template_dependencies:\n type: list\n schema:\n type: string\n```\n## Groups\n\nTarget definitions for group tasks. Groups declare a set of dependencies\nand nothing else. Groups can be used as dependencies for any other target.\n\n\n```\ngroups:\n type: list\n schema:\n type: dict\n schema:\n name:\n type: string\n dependencies: deps\n```\n\n# Manifest Schema Types\n\nThese items may appear in the manifest schema.\n\n## deps\n\nDependencies are lists of Strings.\nThey should be formatted as `(compiles,renders,...)-target`.\n\n\n```\ntype: list\nschema:\n type: string\n```\n## paths\n\nPaths are lists of Strings and can use `/` or `\\\\` as delimeters.\nPaths are relative to the directory that a manifest file is in, but for\nmanifest includes, all \"loaded\" directories are relative to the root\nmanifest's directory. Paths can also be absolute.\n\n\n```\ntype: list\nschema:\n type: string\n```\n\n# Internal Dependency Graph\n\nA coarse view of the internal structure and scale of\n`datazen`'s source.\nGenerated using [pydeps](https://github.com/thebjorn/pydeps) (via\n`mk python-deps`).\n\n![datazen's Dependency Graph](im/pydeps.svg)\n\n*This entire document is generated by this package.*\n",
"bugtrack_url": null,
"license": "",
"summary": "Compile and render schema-validated configuration data.",
"version": "3.1.4",
"project_urls": {
"Homepage": "https://github.com/vkottler/datazen"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a617444306119b949e33c50727216c739ee53525c88aa10b38289828c057bf99",
"md5": "e92b93dab5862c9afc4f75acecdd6032",
"sha256": "385ea96d8e1be2032234d93b22c4190a58416b70699d790aa78efe851f947371"
},
"downloads": -1,
"filename": "datazen-3.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e92b93dab5862c9afc4f75acecdd6032",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 54291,
"upload_time": "2023-10-05T23:58:44",
"upload_time_iso_8601": "2023-10-05T23:58:44.214808Z",
"url": "https://files.pythonhosted.org/packages/a6/17/444306119b949e33c50727216c739ee53525c88aa10b38289828c057bf99/datazen-3.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c7e94e2708e8b63ee550da775a2850b2e4c8b144f3eb88e06cb5a2b79c389ef5",
"md5": "ea9ffe7d111a755779debc4899419ccc",
"sha256": "8ac6e9b5574a9f20f09b201a83d11c0e8fc6476f42ee0f06fd9ee8150294a124"
},
"downloads": -1,
"filename": "datazen-3.1.4.tar.gz",
"has_sig": false,
"md5_digest": "ea9ffe7d111a755779debc4899419ccc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 42567,
"upload_time": "2023-10-05T23:58:45",
"upload_time_iso_8601": "2023-10-05T23:58:45.945485Z",
"url": "https://files.pythonhosted.org/packages/c7/e9/4e2708e8b63ee550da775a2850b2e4c8b144f3eb88e06cb5a2b79c389ef5/datazen-3.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-05 23:58:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vkottler",
"github_project": "datazen",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "datazen"
}