Palgen#
Palgen is a powerful and modular command line tool aiming to simplify writing various common utilities such as build scripts, code generators and preprocessors. Palgen provides an easy-to-use interface for creating command line applications by automatically generating command line interfaces (CLIs) from pydantic schemas. This allows for file-based configurations and setting validation.
Features#
Easily extendible. Once your user provided class inherits from palgen’s
Extension
interface it will be recoginized as extension and become runnable.Automatic generation of command line interfaces.
Settings validation using pydantic.
Easy migration from existing Python projects.
Easy-to-use ingest pipelines for processing data.
Automatic parallelization of extension pipelines unless disabled.
Comprehensive documentation available at palgen.palliate.io.
Installation#
Palgen can be installed via pip:
pip install palgen
Alternatively if you want the latest development version:
pip install git+https://github.com/palliate/palgen.git@master
For now it is necessary to pull it from git directly. A proper release will soon follow.
Documentation#
The detailed documentation for palgen can be found at palgen.palliate.io. It includes guides, examples, and API reference documentation to help you get started and make the most out of palgen.
Examples#
Check out the examples subfolder in the repository for various usage examples for palgen.
Palgen itself uses palgen to generate parts of its documentation. You can check out those more complex extensions in the docs/modules subfolder. Since this project is part of the palliate project you may find additional usage examples in the other repositories within the palliate organization.
Contributing#
Contributions to palgen are very welcome! If you find any issues or have suggestions for improvements, please open an issue on the GitHub repository. You can also submit pull requests with bug fixes or new features.
Before making a contribution, please ensure that you have read and understood the Contributing Guidelines.
Community and Support#
Join the palliate Discord server to connect with the community and get support for palgen and other palliate projects. Join here.
License#
Palgen is licensed under the MIT License. See the LICENSE file for more details.
Changelog#
docs: readd missing settings page by Tsche at 2023-08-22 22:06:10
Modules#
- Installation
- Usage
- Extensions
- Examples
- API Reference
palgen
- Subpackages
palgen.application
- Subpackages
- Submodules
palgen.application.log
- Module Contents
LogFormatter
LogFormatter.__slots__
LogFormatter.colors
LogFormatter.time_fmt
LogFormatter.converter
LogFormatter.default_time_format
LogFormatter.default_msec_format
LogFormatter.get_format()
LogFormatter.format()
LogFormatter.formatTime()
LogFormatter.formatException()
LogFormatter.usesTime()
LogFormatter.formatMessage()
LogFormatter.formatStack()
setup_logger()
set_min_level()
handle_exception()
- Module Contents
palgen.application.runner
- Module Contents
CommandLoader
CommandLoader.command_class
CommandLoader.group_class
CommandLoader.allow_extra_args
CommandLoader.allow_interspersed_args
CommandLoader.context_class
CommandLoader.ignore_unknown_options
CommandLoader.ensure_palgen()
CommandLoader.list_commands()
CommandLoader.get_command()
CommandLoader.format_commands()
CommandLoader.format_options()
CommandLoader.add_command()
CommandLoader.command()
CommandLoader.group()
CommandLoader.to_info_dict()
CommandLoader.collect_usage_pieces()
CommandLoader.result_callback()
CommandLoader.parse_args()
CommandLoader.invoke()
CommandLoader.resolve_command()
CommandLoader.shell_complete()
CommandLoader.get_usage()
CommandLoader.get_params()
CommandLoader.format_usage()
CommandLoader.get_help_option_names()
CommandLoader.get_help_option()
CommandLoader.make_parser()
CommandLoader.get_help()
CommandLoader.get_short_help_str()
CommandLoader.format_help()
CommandLoader.format_help_text()
CommandLoader.format_epilog()
CommandLoader.__repr__()
CommandLoader.make_context()
CommandLoader.main()
CommandLoader.__call__()
main()
check_direct_run()
- Module Contents
palgen.application.util
- Module Contents
T
ListParam
ListParam.name
ListParam.inner_t
ListParam.__class_getitem__
ListParam.__rmul__
ListParam.__slots__
ListParam.__abc_tpflags__
ListParam.is_composite
ListParam.arity
ListParam.envvar_list_splitter
ListParam.convert()
ListParam.new()
ListParam.__repr__()
ListParam.__lt__()
ListParam.__le__()
ListParam.__eq__()
ListParam.__gt__()
ListParam.__ge__()
ListParam.__contains__()
ListParam.__len__()
ListParam.__getitem__()
ListParam.__setitem__()
ListParam.__delitem__()
ListParam.__add__()
ListParam.__radd__()
ListParam.__iadd__()
ListParam.__mul__()
ListParam.__imul__()
ListParam.__copy__()
ListParam.append()
ListParam.insert()
ListParam.pop()
ListParam.remove()
ListParam.clear()
ListParam.copy()
ListParam.count()
ListParam.index()
ListParam.reverse()
ListParam.sort()
ListParam.extend()
ListParam.__iter__()
ListParam.__reversed__()
ListParam.__subclasshook__()
ListParam.to_info_dict()
ListParam.__call__()
ListParam.get_metavar()
ListParam.get_missing_message()
ListParam.split_envvar_value()
ListParam.fail()
ListParam.shell_complete()
K
V
DictParam
DictParam.name
DictParam.key_t
DictParam.value_t
DictParam.__slots__
DictParam.is_composite
DictParam.arity
DictParam.envvar_list_splitter
DictParam.__abc_tpflags__
DictParam.__reversed__
DictParam.convert()
DictParam.new()
DictParam.__class_getitem__()
DictParam.to_info_dict()
DictParam.__call__()
DictParam.get_metavar()
DictParam.get_missing_message()
DictParam.split_envvar_value()
DictParam.fail()
DictParam.shell_complete()
DictParam.__len__()
DictParam.__getitem__()
DictParam.__setitem__()
DictParam.__delitem__()
DictParam.__iter__()
DictParam.__contains__()
DictParam.__repr__()
DictParam.__or__()
DictParam.__ror__()
DictParam.__ior__()
DictParam.__copy__()
DictParam.copy()
DictParam.fromkeys()
DictParam.pop()
DictParam.popitem()
DictParam.clear()
DictParam.update()
DictParam.setdefault()
DictParam.get()
DictParam.keys()
DictParam.items()
DictParam.values()
DictParam.__eq__()
DictParam.__subclasshook__()
extract_help()
pydantic_to_click()
strip_quotes()
- Module Contents
- Package Contents
palgen.ingest
palgen.integrations
palgen.loaders
- Submodules
palgen.loaders.ast_helper
palgen.loaders.builtin
palgen.loaders.loader
palgen.loaders.manifest
- Module Contents
ManifestSchema
ManifestSchema.model_computed_fields
ManifestSchema.model_extra
ManifestSchema.model_fields_set
ManifestSchema.__fields__
ManifestSchema.__fields_set__
ManifestSchema.root
ManifestSchema.__pydantic_root_model__
ManifestSchema.__pydantic_private__
ManifestSchema.__pydantic_extra__
ManifestSchema.__slots__
ManifestSchema.model_config
ManifestSchema.__pydantic_complete__
ManifestSchema.__repr_name__
ManifestSchema.__repr_str__
ManifestSchema.__pretty__
ManifestSchema.__rich_repr__
ManifestSchema.items()
ManifestSchema.model_construct()
ManifestSchema.__eq__()
ManifestSchema.__repr_args__()
ManifestSchema.model_copy()
ManifestSchema.model_dump()
ManifestSchema.model_dump_json()
ManifestSchema.model_json_schema()
ManifestSchema.model_parametrized_name()
ManifestSchema.model_post_init()
ManifestSchema.model_rebuild()
ManifestSchema.model_validate()
ManifestSchema.model_validate_json()
ManifestSchema.__get_pydantic_core_schema__()
ManifestSchema.__get_pydantic_json_schema__()
ManifestSchema.__pydantic_init_subclass__()
ManifestSchema.__class_getitem__()
ManifestSchema.__copy__()
ManifestSchema.__deepcopy__()
ManifestSchema.__setattr__()
ManifestSchema.__delattr__()
ManifestSchema.__getstate__()
ManifestSchema.__setstate__()
ManifestSchema.__iter__()
ManifestSchema.__repr__()
ManifestSchema.__str__()
ManifestSchema.dict()
ManifestSchema.json()
ManifestSchema.parse_obj()
ManifestSchema.parse_raw()
ManifestSchema.parse_file()
ManifestSchema.from_orm()
ManifestSchema.construct()
ManifestSchema.copy()
ManifestSchema.schema()
ManifestSchema.schema_json()
ManifestSchema.validate()
ManifestSchema.update_forward_refs()
ManifestSchema.__init_subclass__()
Manifest
- Module Contents
palgen.loaders.python
- Package Contents
- Submodules
palgen.machinery
palgen.schemas
- Submodules
palgen.schemas.palgen
- Module Contents
ExtensionSettings
ExtensionSettings.model_computed_fields
ExtensionSettings.model_extra
ExtensionSettings.model_fields_set
ExtensionSettings.__fields__
ExtensionSettings.__fields_set__
ExtensionSettings.inherit
ExtensionSettings.folders
ExtensionSettings.dependencies
ExtensionSettings.python
ExtensionSettings.manifest
ExtensionSettings.inline
ExtensionSettings.__slots__
ExtensionSettings.model_config
ExtensionSettings.__pydantic_complete__
ExtensionSettings.__pydantic_root_model__
ExtensionSettings.__repr_name__
ExtensionSettings.__repr_str__
ExtensionSettings.__pretty__
ExtensionSettings.__rich_repr__
ExtensionSettings.model_construct()
ExtensionSettings.model_copy()
ExtensionSettings.model_dump()
ExtensionSettings.model_dump_json()
ExtensionSettings.model_json_schema()
ExtensionSettings.model_parametrized_name()
ExtensionSettings.model_post_init()
ExtensionSettings.model_rebuild()
ExtensionSettings.model_validate()
ExtensionSettings.model_validate_json()
ExtensionSettings.__get_pydantic_core_schema__()
ExtensionSettings.__get_pydantic_json_schema__()
ExtensionSettings.__pydantic_init_subclass__()
ExtensionSettings.__class_getitem__()
ExtensionSettings.__copy__()
ExtensionSettings.__deepcopy__()
ExtensionSettings.__setattr__()
ExtensionSettings.__delattr__()
ExtensionSettings.__getstate__()
ExtensionSettings.__setstate__()
ExtensionSettings.__eq__()
ExtensionSettings.__iter__()
ExtensionSettings.__repr__()
ExtensionSettings.__repr_args__()
ExtensionSettings.__str__()
ExtensionSettings.dict()
ExtensionSettings.json()
ExtensionSettings.parse_obj()
ExtensionSettings.parse_raw()
ExtensionSettings.parse_file()
ExtensionSettings.from_orm()
ExtensionSettings.construct()
ExtensionSettings.copy()
ExtensionSettings.schema()
ExtensionSettings.schema_json()
ExtensionSettings.validate()
ExtensionSettings.update_forward_refs()
PalgenSettings
PalgenSettings.model_computed_fields
PalgenSettings.model_extra
PalgenSettings.model_fields_set
PalgenSettings.__fields__
PalgenSettings.__fields_set__
PalgenSettings.extensions
PalgenSettings.jobs
PalgenSettings.output
PalgenSettings.__slots__
PalgenSettings.model_config
PalgenSettings.__pydantic_complete__
PalgenSettings.__pydantic_root_model__
PalgenSettings.__repr_name__
PalgenSettings.__repr_str__
PalgenSettings.__pretty__
PalgenSettings.__rich_repr__
PalgenSettings.model_construct()
PalgenSettings.model_copy()
PalgenSettings.model_dump()
PalgenSettings.model_dump_json()
PalgenSettings.model_json_schema()
PalgenSettings.model_parametrized_name()
PalgenSettings.model_post_init()
PalgenSettings.model_rebuild()
PalgenSettings.model_validate()
PalgenSettings.model_validate_json()
PalgenSettings.__get_pydantic_core_schema__()
PalgenSettings.__get_pydantic_json_schema__()
PalgenSettings.__pydantic_init_subclass__()
PalgenSettings.__class_getitem__()
PalgenSettings.__copy__()
PalgenSettings.__deepcopy__()
PalgenSettings.__setattr__()
PalgenSettings.__delattr__()
PalgenSettings.__getstate__()
PalgenSettings.__setstate__()
PalgenSettings.__eq__()
PalgenSettings.__iter__()
PalgenSettings.__repr__()
PalgenSettings.__repr_args__()
PalgenSettings.__str__()
PalgenSettings.dict()
PalgenSettings.json()
PalgenSettings.parse_obj()
PalgenSettings.parse_raw()
PalgenSettings.parse_file()
PalgenSettings.from_orm()
PalgenSettings.construct()
PalgenSettings.copy()
PalgenSettings.schema()
PalgenSettings.schema_json()
PalgenSettings.validate()
PalgenSettings.update_forward_refs()
- Module Contents
palgen.schemas.project
- Module Contents
ProjectSettings
ProjectSettings.model_computed_fields
ProjectSettings.model_extra
ProjectSettings.model_fields_set
ProjectSettings.__fields__
ProjectSettings.__fields_set__
ProjectSettings.name
ProjectSettings.version
ProjectSettings.description
ProjectSettings.sources
ProjectSettings.__slots__
ProjectSettings.model_config
ProjectSettings.__pydantic_complete__
ProjectSettings.__pydantic_root_model__
ProjectSettings.__repr_name__
ProjectSettings.__repr_str__
ProjectSettings.__pretty__
ProjectSettings.__rich_repr__
ProjectSettings.model_construct()
ProjectSettings.model_copy()
ProjectSettings.model_dump()
ProjectSettings.model_dump_json()
ProjectSettings.model_json_schema()
ProjectSettings.model_parametrized_name()
ProjectSettings.model_post_init()
ProjectSettings.model_rebuild()
ProjectSettings.model_validate()
ProjectSettings.model_validate_json()
ProjectSettings.__get_pydantic_core_schema__()
ProjectSettings.__get_pydantic_json_schema__()
ProjectSettings.__pydantic_init_subclass__()
ProjectSettings.__class_getitem__()
ProjectSettings.__copy__()
ProjectSettings.__deepcopy__()
ProjectSettings.__setattr__()
ProjectSettings.__delattr__()
ProjectSettings.__getstate__()
ProjectSettings.__setstate__()
ProjectSettings.__eq__()
ProjectSettings.__iter__()
ProjectSettings.__repr__()
ProjectSettings.__repr_args__()
ProjectSettings.__str__()
ProjectSettings.dict()
ProjectSettings.json()
ProjectSettings.parse_obj()
ProjectSettings.parse_raw()
ProjectSettings.parse_file()
ProjectSettings.from_orm()
ProjectSettings.construct()
ProjectSettings.copy()
ProjectSettings.schema()
ProjectSettings.schema_json()
ProjectSettings.validate()
ProjectSettings.update_forward_refs()
- Module Contents
palgen.schemas.root
- Module Contents
RootSettings
RootSettings.model_computed_fields
RootSettings.model_extra
RootSettings.model_fields_set
RootSettings.__fields__
RootSettings.__fields_set__
RootSettings.root
RootSettings.__pydantic_root_model__
RootSettings.__pydantic_private__
RootSettings.__pydantic_extra__
RootSettings.__slots__
RootSettings.model_config
RootSettings.__pydantic_complete__
RootSettings.__repr_name__
RootSettings.__repr_str__
RootSettings.__pretty__
RootSettings.__rich_repr__
RootSettings.validate()
RootSettings.get()
RootSettings.__iter__()
RootSettings.__getitem__()
RootSettings.keys()
RootSettings.items()
RootSettings.model_construct()
RootSettings.__eq__()
RootSettings.__repr_args__()
RootSettings.model_copy()
RootSettings.model_dump()
RootSettings.model_dump_json()
RootSettings.model_json_schema()
RootSettings.model_parametrized_name()
RootSettings.model_post_init()
RootSettings.model_rebuild()
RootSettings.model_validate()
RootSettings.model_validate_json()
RootSettings.__get_pydantic_core_schema__()
RootSettings.__get_pydantic_json_schema__()
RootSettings.__pydantic_init_subclass__()
RootSettings.__class_getitem__()
RootSettings.__copy__()
RootSettings.__deepcopy__()
RootSettings.__setattr__()
RootSettings.__delattr__()
RootSettings.__getstate__()
RootSettings.__setstate__()
RootSettings.__repr__()
RootSettings.__str__()
RootSettings.dict()
RootSettings.json()
RootSettings.parse_obj()
RootSettings.parse_raw()
RootSettings.parse_file()
RootSettings.from_orm()
RootSettings.construct()
RootSettings.copy()
RootSettings.schema()
RootSettings.schema_json()
RootSettings.update_forward_refs()
RootSettings.__init_subclass__()
- Module Contents
- Package Contents
- Submodules
palgen.template
- Submodules
palgen.template.jinja
- Module Contents
Template
Template.module
Template.is_up_to_date
Template.debug_info
Template.__call__
Template.environment_class
Template.environment
Template.globals
Template.name
Template.filename
Template.blocks
Template.root_render_func
Template.default_environment()
Template.from_code()
Template.from_module_dict()
Template.render()
Template.render_async()
Template.stream()
Template.generate()
Template.generate_async()
Template.new_context()
Template.make_module()
Template.make_module_async()
Template.get_corresponding_lineno()
Template.__repr__()
- Module Contents
palgen.template.string
- Submodules
- Submodules
palgen.__main__
palgen.interface
- Module Contents
max_jobs()
Extension
Extension.Settings
Extension.Schema
Extension.name
Extension.description
Extension.private
Extension.ingest
Extension.pipeline
Extension.__slots__
Extension.transform()
Extension.validate()
Extension.render()
Extension.write()
Extension.run()
Extension.to_string()
Extension.__str__()
Extension.__init_subclass__()
- Module Contents
palgen.palgen
- Module Contents
Extensions
Extensions.runnable
Extensions.exportable
Extensions.builtin
Extensions.private
Extensions.inherited
Extensions.local
Extensions.__slots__
Extensions.__abc_tpflags__
Extensions.__reversed__
Extensions.__class_getitem__
Extensions.extend()
Extensions.manifest()
Extensions.__len__()
Extensions.__getitem__()
Extensions.__setitem__()
Extensions.__delitem__()
Extensions.__iter__()
Extensions.__contains__()
Extensions.__repr__()
Extensions.__or__()
Extensions.__ror__()
Extensions.__ior__()
Extensions.__copy__()
Extensions.copy()
Extensions.fromkeys()
Extensions.pop()
Extensions.popitem()
Extensions.clear()
Extensions.update()
Extensions.setdefault()
Extensions.get()
Extensions.keys()
Extensions.items()
Extensions.values()
Extensions.__eq__()
Extensions.__subclasshook__()
Palgen
- Module Contents
- Package Contents
- Subpackages
- Test
- Contributing