ape-compile

class ape_compile.Config(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_prefix: str | None = None, _secrets_dir: str | Path | None = None, *, exclude: set[Union[str, re.Pattern]] = {}, include_dependencies: bool = False, output_extra: list[ape_compile.OutputExtras] = [], **values: Any)

Configure general compiler settings.

exclude: set[Union[str, re.Pattern]]

Source exclusion globs or regex patterns across all file types. To use regex, start your values with r" and they’ll be turned into regex pattern objects.

NOTE: ape.utils.misc.SOURCE_EXCLUDE_PATTERNS are automatically included in this set.

include_dependencies: bool

Set to True to compile dependencies during ape compile. Generally, dependencies are not compiled during ape compile This is because dependencies may not compile in Ape on their own, but you can still reference them in your project’s contracts’ imports. Some projects may be more dependency-based and wish to have the contract types always compiled during ape compile, and these projects should configure include_dependencies to be True.

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_hide_none_type': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_settings_source': None, 'cli_use_class_docs_for_groups': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'allow', 'json_file': None, 'json_file_encoding': None, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

output_extra: list[ape_compile.OutputExtras]

Extra selections to output. Outputs to .build/{key.lower()}.

serialize_exclude(exclude, info)

Exclude is put back with the weird r-prefix so we can go to-and-from.

class ape_compile.OutputExtras(value)

Extra stuff you can output. It will appear in .build/{key.lower()/

ABI = 'ABI'

Include this value to output the ABIs of your contracts to minified JSONs. This is useful for hosting purposes for web-apps.