Core, Publication, And Utility Reference
Core I/O, documents, LLM helpers, reporting, audit manifests, console utilities, and banner helpers.
For workflow context, see Core, Publication, And Utility module guide.
Functions And Classes
fyron.audit.manifest.analysis_run_manifestfyron.audit.manifest.create_provenance_manifestfyron.audit.manifest.hash_filefyron.audit.manifest.write_manifestfyron.banner.get_bannerfyron.banner.get_run_footerfyron.banner.get_run_headerfyron.banner.print_bannerfyron.console.configure_loggingfyron.console.console_messagefyron.console.errorfyron.console.format_countfyron.console.format_durationfyron.console.format_pathfyron.console.get_loggerfyron.console.get_timerfyron.console.infofyron.console.successfyron.console.supports_colorfyron.console.warningfyron.core.env.load_envfyron.core.io.DataIOfyron.core.io.DataIO.read_csvfyron.core.io.DataIO.write_csvfyron.core.io.DataIO.read_excelfyron.core.io.DataIO.write_excelfyron.core.io.DataIO.read_jsonfyron.core.io.DataIO.write_jsonfyron.core.io.DataIO.read_tablefyron.core.io.DataIO.write_tablefyron.core.io.DataIO.summarize_tablefyron.core.io.DataIO.describe_filefyron.core.io.TeableClientfyron.core.io.TeableClient.list_recordsfyron.core.io.TeableClient.list_spacesfyron.core.io.TeableClient.list_basesfyron.core.io.TeableClient.create_basefyron.core.io.TeableClient.get_or_create_basefyron.core.io.TeableClient.list_tablesfyron.core.io.TeableClient.create_tablefyron.core.io.TeableClient.get_or_create_tablefyron.core.io.TeableClient.read_tablefyron.core.io.TeableClient.create_recordsfyron.core.io.TeableClient.delete_recordsfyron.core.io.TeableClient.clear_tablefyron.core.io.TeableClient.write_dataframefyron.core.io.TeableClient.overwrite_tablefyron.core.io.TeableClient.read_cohortfyron.core.io.TeableClient.write_research_cohortfyron.core.io.TeableClient.create_research_cohort_tablefyron.core.io.TeableClient.summarize_teable_tablefyron.core.io.TeableConfigfyron.core.io.describe_filefyron.core.io.ensure_parent_dirfyron.core.io.read_csvfyron.core.io.read_excelfyron.core.io.read_jsonfyron.core.io.read_tablefyron.core.io.summarize_tablefyron.core.io.write_csvfyron.core.io.write_excelfyron.core.io.write_jsonfyron.core.io.write_tablefyron.core.s3.S3Storagefyron.core.s3.S3Storage.keyfyron.core.s3.S3Storage.existsfyron.core.s3.S3Storage.listfyron.core.s3.S3Storage.read_bytesfyron.core.s3.S3Storage.write_bytesfyron.core.s3.S3Storage.read_jsonfyron.core.s3.S3Storage.write_jsonfyron.core.s3.S3Storage.read_tablefyron.core.s3.S3Storage.write_tablefyron.core.s3.S3Storage.download_filefyron.core.s3.S3Storage.upload_filefyron.core.s3.parse_s3_urifyron.core.s3.read_s3_tablefyron.core.s3.write_s3_tablefyron.curate.build_compose_commandfyron.curate.default_app_dirfyron.curate.start_curatorfyron.datasets.make_boa_like_folderfyron.datasets.make_classification_cohortfyron.datasets.make_clinical_cohortfyron.datasets.make_dicom_seriesfyron.datasets.make_nifti_pairfyron.datasets.make_survival_cohortfyron.datasets.preparation.prepare_nnunetv2_datasetfyron.datasets.preparation.prepare_yolo_classification_datasetfyron.datasets.preparation.prepare_yolo_detection_datasetfyron.datasets.preparation.validate_nnunetv2_datasetfyron.datasets.preparation.validate_yolo_datasetfyron.datasets.preparation.write_dataset_manifestfyron.documents.client.DocumentDownloaderfyron.documents.client.DocumentDownloader.closefyron.documents.client.DocumentDownloader.download_idfyron.documents.client.DocumentDownloader.download_urlfyron.documents.client.DocumentDownloader.download_urlsfyron.documents.client.DocumentDownloader.download_from_dataframefyron.documents.client.DocumentDownloader.download_from_dffyron.documents.client.DocumentResultfyron.get_bannerfyron.get_run_footerfyron.get_run_headerfyron.llm.agent.LLMAgentfyron.llm.agent.LLMAgent.promptfyron.llm.agent.LLMAgent.chatfyron.llm.agent.LLMAgent.run_on_dataframefyron.llm.agent.LLMAgent.run_on_documentsfyron.llm.agent.LLMAgent.prompt_documentsfyron.llm.agent.LLMAgent.prompt_dataframefyron.llm.agent.LLMAgent.prompt_dffyron.llm.agent.LLMAgent.run_prompt_on_dataframefyron.llm.agent.LLMAgent.describe_python_filefyron.llm.agent.LLMAgent.run_on_directoryfyron.llm.agent.LLMAgent.prompt_directoryfyron.llm.agent.LLMConfigfyron.plotting_palettes.PaletteSpecfyron.plotting_palettes.get_colormapfyron.plotting_palettes.get_palettefyron.plotting_palettes.list_palettesfyron.plotting_palettes.palette_grayscale_contrastfyron.plotting_palettes.palette_luminance_tablefyron.plotting_palettes.preview_palettefyron.plotting_palettes.resolve_colormapfyron.plotting_palettes.resolve_palettefyron.plotting_palettes.set_plot_stylefyron.print_bannerfyron.reporting.tables.cohort_flow_tablefyron.reporting.tables.compare_models_tablefyron.reporting.tables.dataframe_to_markdownfyron.reporting.tables.format_estimate_cifyron.reporting.tables.metrics_tablefyron.reporting.tables.summarize_baseline_table
fyron.audit.manifest.analysis_run_manifest
Create a provenance manifest for one clinical analysis run.
Import path: fyron.audit.manifest.analysis_run_manifest
analysis_run_manifest(*, title: str, inputs: Sequence[str | Path] | None = None, outputs: Sequence[str | Path] | None = None, parameters: Mapping[str, Any] | None = None, random_seed: int | None = None, analysis_type: str | None = None, cohort_id: str | None = None, notes: str | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
title | yes | str | Human-readable run title. | |
inputs | no | Sequence[str or Path] or None | None | See signature. |
outputs | no | Sequence[str or Path] or None | None | Input and output artifacts. Existing input files are hashed. |
parameters | no | Mapping[str, Any] or None | None | See signature. |
random_seed | no | int or None | None | Optional seed used for splitting, bootstrapping, or model fitting. |
analysis_type | no | str or None | None | Optional label such as `"survival", "classification", or "boa_features"`. |
cohort_id | no | str or None | None | Optional cohort identifier or version. |
notes | no | str or None | None | Free-text provenance notes. |
Returns
dict - JSON-serializable manifest with Fyron/runtime metadata and analysis context.
See also: Core, Publication, And Utility module guide.
fyron.audit.manifest.create_provenance_manifest
Create a JSON-serializable provenance manifest.
Import path: fyron.audit.manifest.create_provenance_manifest
create_provenance_manifest(*, title: str | None = None, inputs: Sequence[str | Path] | None = None, outputs: Sequence[str | Path] | None = None, parameters: Mapping[str, Any] | None = None, notes: str | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
title | no | str or None | None | See signature. |
inputs | no | Sequence[str or Path] or None | None | See signature. |
outputs | no | Sequence[str or Path] or None | None | See signature. |
parameters | no | Mapping[str, Any] or None | None | See signature. |
notes | no | str or None | None | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.audit.manifest.hash_file
Hash a file for provenance tracking.
Import path: fyron.audit.manifest.hash_file
hash_file(path: str | Path, *, algorithm: str = 'sha256', chunk_size: int = 1024 * 1024) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. | |
algorithm | no | str | 'sha256' | See signature. |
chunk_size | no | int | 1024 * 1024 | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.audit.manifest.write_manifest
Write a provenance manifest as pretty JSON.
Import path: fyron.audit.manifest.write_manifest
write_manifest(manifest: Mapping[str, Any], path: str | Path) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
manifest | yes | Mapping[str, Any] | See signature. | |
path | yes | str or Path | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.banner.get_banner
Return the Bits & Flames Fyron terminal banner.
Import path: fyron.banner.get_banner
get_banner(version: str | None = None, *, include_version: bool = True, color: bool = True, theme: str = 'bf') -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
version | no | str or None | None | Optional version label. If omitted, the installed package version is used. |
include_version | no | bool | True | Append a version line below the banner when `True`. |
color | no | bool | True | Render the pixel logo with ANSI colors when `True`. |
theme | no | str | 'bf' | Terminal theme: `"bf" for the colored Bits & Flames wordmark, "plain" for ASCII logs, or "mono"` for minimal monochrome output. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.banner.get_run_footer
Return a compact Fyron run footer.
Import path: fyron.banner.get_run_footer
get_run_footer(status: str = 'success', *, duration: float | None = None, outputs: list[str | Path] | tuple[str | Path, ...] | None = None, color: bool = True) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
status | no | str | 'success' | See signature. |
duration | no | float or None | None | See signature. |
outputs | no | list[str or Path] or tuple[str or Path, ...] or None | None | See signature. |
color | no | bool | True | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.banner.get_run_header
Return a compact Fyron run header for scripts and CLI jobs.
Import path: fyron.banner.get_run_header
get_run_header(command: str | None = None, *, version: bool = True, timestamp: bool = True, color: bool = True) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
command | no | str or None | None | See signature. |
version | no | bool | True | See signature. |
timestamp | no | bool | True | See signature. |
color | no | bool | True | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.banner.print_banner
Print the Bits & Flames Fyron terminal banner to a text stream.
Import path: fyron.banner.print_banner
print_banner(version: str | None = None, *, include_version: bool = True, color: bool = True, theme: str = 'bf', file: TextIO | None = None) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
version | no | str or None | None | See signature. |
include_version | no | bool | True | See signature. |
color | no | bool | True | See signature. |
theme | no | str | 'bf' | See signature. |
file | no | TextIO or None | None | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.console.configure_logging
Configure root Fyron logging and return the `fyron` logger.
Import path: fyron.console.configure_logging
configure_logging(level: str | int = 'INFO', *, color: bool = True, json: bool = False, stream: TextIO | None = None) -> logging.LoggerParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
level | no | str or int | 'INFO' | See signature. |
color | no | bool | True | See signature. |
json | no | bool | False | See signature. |
stream | no | TextIO or None | None | See signature. |
Returns
logging.Logger
See also: Core, Publication, And Utility module guide.
fyron.console.console_message
Print and return a styled terminal message.
Import path: fyron.console.console_message
console_message(message: str, *, level: str = 'info', color: bool = True, prefix: str = 'fyron', stream: TextIO | None = None, quiet: bool = False) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
message | yes | str | See signature. | |
level | no | str | 'info' | See signature. |
color | no | bool | True | See signature. |
prefix | no | str | 'fyron' | See signature. |
stream | no | TextIO or None | None | See signature. |
quiet | no | bool | False | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.error
See the signature and linked module guide for context.
Import path: fyron.console.error
error(message: str, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
message | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.format_count
See the signature and linked module guide for context.
Import path: fyron.console.format_count
format_count(label: str, value: int | float) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
label | yes | str | See signature. | |
value | yes | int or float | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.format_duration
See the signature and linked module guide for context.
Import path: fyron.console.format_duration
format_duration(seconds: float) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
seconds | yes | float | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.format_path
See the signature and linked module guide for context.
Import path: fyron.console.format_path
format_path(path: str | Path) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.get_logger
Return a logger below the Fyron namespace.
Import path: fyron.console.get_logger
get_logger(name: str | None = None) -> logging.LoggerParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name | no | str or None | None | See signature. |
Returns
logging.Logger
See also: Core, Publication, And Utility module guide.
fyron.console.get_timer
See the signature and linked module guide for context.
Import path: fyron.console.get_timer
get_timer() -> floatParameters
No parameters documented.
Returns
float
See also: Core, Publication, And Utility module guide.
fyron.console.info
See the signature and linked module guide for context.
Import path: fyron.console.info
info(message: str, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
message | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.success
See the signature and linked module guide for context.
Import path: fyron.console.success
success(message: str, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
message | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.console.supports_color
Return whether ANSI colors should be emitted for a stream.
Import path: fyron.console.supports_color
supports_color(stream: TextIO | None = None) -> boolParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
stream | no | TextIO or None | None | See signature. |
Returns
bool
See also: Core, Publication, And Utility module guide.
fyron.console.warning
See the signature and linked module guide for context.
Import path: fyron.console.warning
warning(message: str, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
message | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.env.load_env
Load environment variables from a .env file.
Import path: fyron.core.env.load_env
load_env(path: Optional[str] = None, *, override: bool = False, warn_if_missing: bool = True) -> Optional[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | no | Optional[str] | None | Optional path to a .env file. If None, searches from the current working directory. |
override | no | bool | False | Whether to override existing environment variables. |
warn_if_missing | no | bool | True | If True, logs a warning when no .env file is found. |
Returns
Optional[str]
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO
Convenience wrappers for local table and JSON IO.
Import path: fyron.core.io.DataIO
DataIO()Parameters
No parameters documented.
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
Public Methods
fyron.core.io.DataIO.read_csv
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.read_csv
DataIO.read_csv(path: str, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.write_csv
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.write_csv
DataIO.write_csv(df: pd.DataFrame, path: str, **kwargs: Any) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.read_excel
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.read_excel
DataIO.read_excel(path: str, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.write_excel
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.write_excel
DataIO.write_excel(df: pd.DataFrame, path: str, **kwargs: Any) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.read_json
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.read_json
DataIO.read_json(path: str | Path, **kwargs: Any) -> AnyParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. | |
kwargs | yes | Any | See signature. |
Returns
Any
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.write_json
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.write_json
DataIO.write_json(payload: Any, path: str | Path, *, indent: int | None = 2, create_parent: bool = True, **kwargs: Any) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
payload | yes | Any | See signature. | |
path | yes | str or Path | See signature. | |
indent | no | int or None | 2 | See signature. |
create_parent | no | bool | True | See signature. |
kwargs | yes | Any | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.read_table
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.read_table
DataIO.read_table(path: str | Path, *, file_format: str | None = None, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. | |
file_format | no | str or None | None | See signature. |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.write_table
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.write_table
DataIO.write_table(df: pd.DataFrame, path: str | Path, *, file_format: str | None = None, create_parent: bool = True, index: bool = False, **kwargs: Any) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str or Path | See signature. | |
file_format | no | str or None | None | See signature. |
create_parent | no | bool | True | See signature. |
index | no | bool | False | See signature. |
kwargs | yes | Any | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.summarize_table
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.summarize_table
DataIO.summarize_table(df: pd.DataFrame, *, name: str | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
name | no | str or None | None | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.DataIO.describe_file
See the signature and linked module guide for context.
Import path: fyron.core.io.DataIO.describe_file
DataIO.describe_file(path: str | Path) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient
Minimal Teable table client for reading/writing DataFrames.
Import path: fyron.core.io.TeableClient
TeableClient(self, base_url: Optional[str] = None, token: Optional[str] = None, timeout: int = 30)Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
base_url | no | Optional[str] | None | See signature. |
token | no | Optional[str] | None | See signature. |
timeout | no | int | 30 | See signature. |
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
Public Methods
fyron.core.io.TeableClient.list_records
See the signature and linked module guide for context.
Import path: fyron.core.io.TeableClient.list_records
TeableClient.list_records(self, table_id: str, *, view_id: Optional[str] = None, take: int = 1000, skip: int = 0, field_key_type: str = 'name', cell_format: str = 'json', projection: Optional[List[str]] = None, **params: Any) -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
view_id | no | Optional[str] | None | See signature. |
take | no | int | 1000 | See signature. |
skip | no | int | 0 | See signature. |
field_key_type | no | str | 'name' | See signature. |
cell_format | no | str | 'json' | See signature. |
projection | no | Optional[List[str]] | None | See signature. |
params | yes | Any | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.list_spaces
List spaces available to the current token.
Import path: fyron.core.io.TeableClient.list_spaces
TeableClient.list_spaces(self) -> List[Dict[str, Any]]Parameters
No parameters documented.
Returns
List[Dict[str, Any]]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.list_bases
List bases for a space or all accessible bases.
Import path: fyron.core.io.TeableClient.list_bases
TeableClient.list_bases(self, *, space_id: Optional[str] = None) -> List[Dict[str, Any]]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
space_id | no | Optional[str] | None | See signature. |
Returns
List[Dict[str, Any]]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.create_base
Create a base in a space.
Import path: fyron.core.io.TeableClient.create_base
TeableClient.create_base(self, *, space_id: str, name: str, icon: Optional[str] = None) -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
space_id | yes | str | See signature. | |
name | yes | str | See signature. | |
icon | no | Optional[str] | None | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.get_or_create_base
Return a base by name, creating it if it doesn't exist.
Import path: fyron.core.io.TeableClient.get_or_create_base
TeableClient.get_or_create_base(self, *, name: str, space_id: Optional[str] = None, space_name: Optional[str] = None, icon: Optional[str] = None) -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name | yes | str | See signature. | |
space_id | no | Optional[str] | None | See signature. |
space_name | no | Optional[str] | None | See signature. |
icon | no | Optional[str] | None | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.list_tables
List tables in a base.
Import path: fyron.core.io.TeableClient.list_tables
TeableClient.list_tables(self, base_id: str) -> List[Dict[str, Any]]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
base_id | yes | str | See signature. |
Returns
List[Dict[str, Any]]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.create_table
Create a table in a base.
Import path: fyron.core.io.TeableClient.create_table
TeableClient.create_table(self, *, base_id: str, name: str, db_table_name: Optional[str] = None, description: Optional[str] = None, icon: Optional[str] = None, fields: Optional[List[Dict[str, Any]]] = None, views: Optional[List[Dict[str, Any]]] = None, records: Optional[List[Dict[str, Any]]] = None, order: Optional[int] = None, field_key_type: str = 'name') -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
base_id | yes | str | See signature. | |
name | yes | str | See signature. | |
db_table_name | no | Optional[str] | None | See signature. |
description | no | Optional[str] | None | See signature. |
icon | no | Optional[str] | None | See signature. |
fields | no | Optional[List[Dict[str, Any]]] | None | See signature. |
views | no | Optional[List[Dict[str, Any]]] | None | See signature. |
records | no | Optional[List[Dict[str, Any]]] | None | See signature. |
order | no | Optional[int] | None | See signature. |
field_key_type | no | str | 'name' | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.get_or_create_table
Return a table by name (or db_table_name), creating it if missing.
Import path: fyron.core.io.TeableClient.get_or_create_table
TeableClient.get_or_create_table(self, *, base_id: str, name: str, db_table_name: Optional[str] = None, description: Optional[str] = None, icon: Optional[str] = None, fields: Optional[List[Dict[str, Any]]] = None, views: Optional[List[Dict[str, Any]]] = None, records: Optional[List[Dict[str, Any]]] = None, order: Optional[int] = None, field_key_type: str = 'name') -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
base_id | yes | str | See signature. | |
name | yes | str | See signature. | |
db_table_name | no | Optional[str] | None | See signature. |
description | no | Optional[str] | None | See signature. |
icon | no | Optional[str] | None | See signature. |
fields | no | Optional[List[Dict[str, Any]]] | None | See signature. |
views | no | Optional[List[Dict[str, Any]]] | None | See signature. |
records | no | Optional[List[Dict[str, Any]]] | None | See signature. |
order | no | Optional[int] | None | See signature. |
field_key_type | no | str | 'name' | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.read_table
See the signature and linked module guide for context.
Import path: fyron.core.io.TeableClient.read_table
TeableClient.read_table(self, table_id: str, *, view_id: Optional[str] = None, field_key_type: str = 'name', cell_format: str = 'json', projection: Optional[List[str]] = None, take: int = 1000, max_records: Optional[int] = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
view_id | no | Optional[str] | None | See signature. |
field_key_type | no | str | 'name' | See signature. |
cell_format | no | str | 'json' | See signature. |
projection | no | Optional[List[str]] | None | See signature. |
take | no | int | 1000 | See signature. |
max_records | no | Optional[int] | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.create_records
See the signature and linked module guide for context.
Import path: fyron.core.io.TeableClient.create_records
TeableClient.create_records(self, table_id: str, records: Iterable[Dict[str, Any]], *, field_key_type: str = 'name', typecast: bool = True, order: Optional[Dict[str, Any]] = None) -> Dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
records | yes | Iterable[Dict[str, Any]] | See signature. | |
field_key_type | no | str | 'name' | See signature. |
typecast | no | bool | True | See signature. |
order | no | Optional[Dict[str, Any]] | None | See signature. |
Returns
Dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.delete_records
Delete records by ID.
Import path: fyron.core.io.TeableClient.delete_records
TeableClient.delete_records(self, table_id: str, record_ids: List[str]) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
record_ids | yes | List[str] | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.clear_table
Delete all records in a table and return deleted count.
Import path: fyron.core.io.TeableClient.clear_table
TeableClient.clear_table(self, table_id: str, *, batch_size: int = 200, take: int = 1000) -> intParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
batch_size | no | int | 200 | See signature. |
take | no | int | 1000 | See signature. |
Returns
int
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.write_dataframe
See the signature and linked module guide for context.
Import path: fyron.core.io.TeableClient.write_dataframe
TeableClient.write_dataframe(self, table_id: str, df: pd.DataFrame, *, field_key_type: str = 'name', typecast: bool = True, chunk_size: int = 200) -> List[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
df | yes | pd.DataFrame | See signature. | |
field_key_type | no | str | 'name' | See signature. |
typecast | no | bool | True | See signature. |
chunk_size | no | int | 200 | See signature. |
Returns
List[str]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.overwrite_table
Delete all records in a table, then write the DataFrame.
Import path: fyron.core.io.TeableClient.overwrite_table
TeableClient.overwrite_table(self, table_id: str, df: pd.DataFrame, *, delete_batch_size: int = 200, create_chunk_size: int = 200, field_key_type: str = 'name', typecast: bool = True) -> List[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
df | yes | pd.DataFrame | See signature. | |
delete_batch_size | no | int | 200 | See signature. |
create_chunk_size | no | int | 200 | See signature. |
field_key_type | no | str | 'name' | See signature. |
typecast | no | bool | True | See signature. |
Returns
List[str]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.read_cohort
Read a reviewed Teable cohort and validate basic cohort shape.
Import path: fyron.core.io.TeableClient.read_cohort
TeableClient.read_cohort(self, table_id: str, *, id_col: str | None = None, required_columns: list[str] | None = None, view_id: str | None = None, max_records: int | None = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
id_col | no | str or None | None | See signature. |
required_columns | no | list[str] or None | None | See signature. |
view_id | no | str or None | None | See signature. |
max_records | no | int or None | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.write_research_cohort
Write a finished research cohort to Teable and return an audit summary.
Import path: fyron.core.io.TeableClient.write_research_cohort
TeableClient.write_research_cohort(self, table_id: str, df: pd.DataFrame, *, mode: str = 'append', cohort_name: str | None = None, version: str | None = None, metadata: dict[str, Any] | None = None, id_col: str | None = None, field_key_type: str = 'name', typecast: bool = True, chunk_size: int = 200) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
df | yes | pd.DataFrame | See signature. | |
mode | no | str | 'append' | See signature. |
cohort_name | no | str or None | None | See signature. |
version | no | str or None | None | See signature. |
metadata | no | dict[str, Any] or None | None | See signature. |
id_col | no | str or None | None | See signature. |
field_key_type | no | str | 'name' | See signature. |
typecast | no | bool | True | See signature. |
chunk_size | no | int | 200 | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.create_research_cohort_table
Create a Teable table for a research cohort.
Import path: fyron.core.io.TeableClient.create_research_cohort_table
TeableClient.create_research_cohort_table(self, *, base_id: str, name: str, df: pd.DataFrame | None = None, description: str | None = None, fields: list[dict[str, Any]] | None = None, metadata: dict[str, Any] | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
base_id | yes | str | See signature. | |
name | yes | str | See signature. | |
df | no | pd.DataFrame or None | None | See signature. |
description | no | str or None | None | See signature. |
fields | no | list[dict[str, Any]] or None | None | See signature. |
metadata | no | dict[str, Any] or None | None | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableClient.summarize_teable_table
Return a compact summary for a Teable table.
Import path: fyron.core.io.TeableClient.summarize_teable_table
TeableClient.summarize_teable_table(self, table_id: str, *, view_id: str | None = None, projection: list[str] | None = None, max_records: int | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
table_id | yes | str | See signature. | |
view_id | no | str or None | None | See signature. |
projection | no | list[str] or None | None | See signature. |
max_records | no | int or None | None | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.TeableConfig
See the signature and linked module guide for context.
Import path: fyron.core.io.TeableConfig
TeableConfig()Parameters
No parameters documented.
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
fyron.core.io.describe_file
Return file metadata without reading the payload.
Import path: fyron.core.io.describe_file
describe_file(path: str | Path) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.ensure_parent_dir
Create the parent directory for a file path and return the path.
Import path: fyron.core.io.ensure_parent_dir
ensure_parent_dir(path: str | Path) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.io.read_csv
Read a CSV file (shortcut for DataIO.read_csv).
Import path: fyron.core.io.read_csv
read_csv(path: str, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.read_excel
Read an Excel file (shortcut for DataIO.read_excel).
Import path: fyron.core.io.read_excel
read_excel(path: str, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.read_json
Read a UTF-8 JSON file.
Import path: fyron.core.io.read_json
read_json(path: str | Path, **kwargs: Any) -> AnyParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. | |
kwargs | yes | Any | See signature. |
Returns
Any
See also: Core, Publication, And Utility module guide.
fyron.core.io.read_table
Read a table from CSV, TSV, Excel, JSON, or JSONL.
Import path: fyron.core.io.read_table
read_table(path: str | Path, *, file_format: str | None = None, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path | yes | str or Path | See signature. | |
file_format | no | str or None | None | See signature. |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.io.summarize_table
Return compact metadata for a DataFrame.
Import path: fyron.core.io.summarize_table
summarize_table(df: pd.DataFrame, *, name: str | None = None) -> dict[str, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
name | no | str or None | None | See signature. |
Returns
dict[str, Any]
See also: Core, Publication, And Utility module guide.
fyron.core.io.write_csv
Write a DataFrame to CSV (shortcut for DataIO.write_csv).
Import path: fyron.core.io.write_csv
write_csv(df: pd.DataFrame, path: str, **kwargs: Any) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.core.io.write_excel
Write a DataFrame to Excel (shortcut for DataIO.write_excel).
Import path: fyron.core.io.write_excel
write_excel(df: pd.DataFrame, path: str, **kwargs: Any) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.core.io.write_json
Write a UTF-8 JSON file and return the output path.
Import path: fyron.core.io.write_json
write_json(payload: Any, path: str | Path, *, indent: int | None = 2, create_parent: bool = True, **kwargs: Any) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
payload | yes | Any | See signature. | |
path | yes | str or Path | See signature. | |
indent | no | int or None | 2 | See signature. |
create_parent | no | bool | True | See signature. |
kwargs | yes | Any | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.io.write_table
Write a table to CSV, TSV, Excel, JSON, or JSONL and return the path.
Import path: fyron.core.io.write_table
write_table(df: pd.DataFrame, path: str | Path, *, file_format: str | None = None, create_parent: bool = True, index: bool = False, **kwargs: Any) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
path | yes | str or Path | See signature. | |
file_format | no | str or None | None | See signature. |
create_parent | no | bool | True | See signature. |
index | no | bool | False | See signature. |
kwargs | yes | Any | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage
Small S3 wrapper for clinical data science tables and sidecar files.
Import path: fyron.core.s3.S3Storage
S3Storage(self, bucket: str | None = None, *, prefix: str = '', endpoint_url: str | None = None, region_name: str | None = None, profile_name: str | None = None, access_key_id: str | None = None, secret_access_key: str | None = None, session_token: str | None = None)Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
bucket | no | str or None | None | Bucket name. Defaults to `S3_BUCKET`. |
prefix | no | str | '' | Optional key prefix prepended to reads and writes. Defaults to `S3_PREFIX` when omitted. |
endpoint_url | no | str or None | None | Optional S3-compatible endpoint URL such as MinIO. Defaults to `S3_ENDPOINT_URL`. |
region_name | no | str or None | None | AWS region name. Defaults to `AWS_REGION or AWS_DEFAULT_REGION`. |
profile_name | no | str or None | None | Optional boto3 profile name for local credential resolution. |
access_key_id | no | str or None | None | Optional explicit access key ID for S3-compatible deployments. |
secret_access_key | no | str or None | None | Optional explicit secret access key. Prefer environment variables or a profile for shared research environments. |
session_token | no | str or None | None | Optional temporary session token. |
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
Public Methods
fyron.core.s3.S3Storage.key
Return a key with the configured prefix applied.
Import path: fyron.core.s3.S3Storage.key
S3Storage.key(self, key: str) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.exists
Return whether an object exists.
Import path: fyron.core.s3.S3Storage.exists
S3Storage.exists(self, key: str) -> boolParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. |
Returns
bool
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.list
List objects under a prefix.
Import path: fyron.core.s3.S3Storage.list
S3Storage.list(self, prefix: str | None = None, *, suffix: str | None = None, max_keys: int | None = None) -> list[dict[str, Any]]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
prefix | no | str or None | None | See signature. |
suffix | no | str or None | None | See signature. |
max_keys | no | int or None | None | See signature. |
Returns
list[dict[str, Any]]
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.read_bytes
Read an object as bytes.
Import path: fyron.core.s3.S3Storage.read_bytes
S3Storage.read_bytes(self, key: str) -> bytesParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. |
Returns
bytes
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.write_bytes
Write bytes to S3 and return the s3 URI.
Import path: fyron.core.s3.S3Storage.write_bytes
S3Storage.write_bytes(self, key: str, data: bytes, *, content_type: str | None = None) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. | |
data | yes | bytes | See signature. | |
content_type | no | str or None | None | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.read_json
Read a JSON object.
Import path: fyron.core.s3.S3Storage.read_json
S3Storage.read_json(self, key: str) -> AnyParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. |
Returns
Any
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.write_json
Write a JSON object.
Import path: fyron.core.s3.S3Storage.write_json
S3Storage.write_json(self, key: str, payload: Any, *, indent: int | None = 2) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. | |
payload | yes | Any | See signature. | |
indent | no | int or None | 2 | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.read_table
Read a table from S3.
Import path: fyron.core.s3.S3Storage.read_table
S3Storage.read_table(self, key: str, *, file_format: str | None = None, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. | |
file_format | no | str or None | None | See signature. |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.write_table
Write a table to S3.
Import path: fyron.core.s3.S3Storage.write_table
S3Storage.write_table(self, key: str, df: pd.DataFrame, *, file_format: str | None = None, index: bool = False, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. | |
df | yes | pd.DataFrame | See signature. | |
file_format | no | str or None | None | See signature. |
index | no | bool | False | See signature. |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.download_file
Download an object to a local file.
Import path: fyron.core.s3.S3Storage.download_file
S3Storage.download_file(self, key: str, local_path: str | Path, *, create_parent: bool = True) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
key | yes | str | See signature. | |
local_path | yes | str or Path | See signature. | |
create_parent | no | bool | True | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.core.s3.S3Storage.upload_file
Upload a local file and return the s3 URI.
Import path: fyron.core.s3.S3Storage.upload_file
S3Storage.upload_file(self, local_path: str | Path, key: str | None = None, *, content_type: str | None = None) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
local_path | yes | str or Path | See signature. | |
key | no | str or None | None | See signature. |
content_type | no | str or None | None | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.core.s3.parse_s3_uri
Parse an s3://bucket/key URI.
Import path: fyron.core.s3.parse_s3_uri
parse_s3_uri(uri: str) -> dict[str, str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
uri | yes | str | See signature. |
Returns
dict[str, str]
See also: Core, Publication, And Utility module guide.
fyron.core.s3.read_s3_table
Read a table from an s3:// URI.
Import path: fyron.core.s3.read_s3_table
read_s3_table(uri: str, **kwargs: Any) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
uri | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.core.s3.write_s3_table
Write a DataFrame to an s3:// URI.
Import path: fyron.core.s3.write_s3_table
write_s3_table(df: pd.DataFrame, uri: str, **kwargs: Any) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
uri | yes | str | See signature. | |
kwargs | yes | Any | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.curate.build_compose_command
Build the Docker Compose command used to run the curator stack.
Import path: fyron.curate.build_compose_command
build_compose_command(*, build: bool = True, detached: bool = True) -> list[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
build | no | bool | True | See signature. |
detached | no | bool | True | See signature. |
Returns
list[str]
See also: Core, Publication, And Utility module guide.
fyron.curate.default_app_dir
Return the best available path for the bundled image curator app.
Import path: fyron.curate.default_app_dir
default_app_dir() -> PathParameters
No parameters documented.
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.curate.start_curator
Start the local Fyron image curator Docker Compose app.
Import path: fyron.curate.start_curator
start_curator(*, app_dir: str | Path | None = None, build: bool = True, detached: bool = True, open_browser: bool = False, color: bool = True, quiet: bool = False) -> intParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
app_dir | no | str or Path or None | None | See signature. |
build | no | bool | True | See signature. |
detached | no | bool | True | See signature. |
open_browser | no | bool | False | See signature. |
color | no | bool | True | See signature. |
quiet | no | bool | False | See signature. |
Returns
int
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_boa_like_folder
Create a minimal BOA-like cohort folder with one synthetic case.
Import path: fyron.datasets.make_boa_like_folder
make_boa_like_folder(output_dir: str | Path) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
output_dir | yes | str or Path | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_classification_cohort
Create a tiny tabular classification dataset.
Import path: fyron.datasets.make_classification_cohort
make_classification_cohort(n: int = 80, *, random_state: int = 42) -> tuple[pd.DataFrame, pd.Series]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
n | no | int | 80 | See signature. |
random_state | no | int | 42 | See signature. |
Returns
tuple[pd.DataFrame, pd.Series]
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_clinical_cohort
Create a deterministic synthetic clinical cohort.
Import path: fyron.datasets.make_clinical_cohort
make_clinical_cohort(n: int = 40, *, random_state: int = 42) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
n | no | int | 40 | See signature. |
random_state | no | int | 42 | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_dicom_series
Write a tiny synthetic CT DICOM series.
Import path: fyron.datasets.make_dicom_series
make_dicom_series(output_dir: str | Path, *, shape: tuple[int, int, int] = (3, 8, 8), patient_id: str = 'SYNTHETIC') -> list[Path]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
output_dir | yes | str or Path | See signature. | |
shape | no | tuple[int, int, int] | (3, 8, 8) | See signature. |
patient_id | no | str | 'SYNTHETIC' | See signature. |
Returns
list[Path]
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_nifti_pair
Write a tiny synthetic image/mask NIfTI pair.
Import path: fyron.datasets.make_nifti_pair
make_nifti_pair(output_dir: str | Path, *, shape: tuple[int, int, int] = (4, 8, 8)) -> dict[str, Path]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
output_dir | yes | str or Path | See signature. | |
shape | no | tuple[int, int, int] | (4, 8, 8) | See signature. |
Returns
dict[str, Path]
See also: Core, Publication, And Utility module guide.
fyron.datasets.make_survival_cohort
Create a deterministic survival-ready cohort with time and event.
Import path: fyron.datasets.make_survival_cohort
make_survival_cohort(n: int = 40, *, random_state: int = 42) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
n | no | int | 40 | See signature. |
random_state | no | int | 42 | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.prepare_nnunetv2_dataset
Prepare an nnU-Net v2 segmentation dataset from a tabular manifest.
Import path: fyron.datasets.preparation.prepare_nnunetv2_dataset
prepare_nnunetv2_dataset(manifest: pd.DataFrame | str | Path, output_dir: str | Path, dataset_id: int, dataset_name: str, image_col: str = 'image_path', label_col: str = 'label_path', case_id_col: str = 'case_id', split_col: str = 'split', channel_names: dict[int | str, str] | Sequence[str] | None = None, labels: dict[int | str, str] | None = None, copy_mode: CopyMode = 'copy', overwrite: bool = False, validate: bool = True) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
manifest | yes | pd.DataFrame or str or Path | See signature. | |
output_dir | yes | str or Path | See signature. | |
dataset_id | yes | int | See signature. | |
dataset_name | yes | str | See signature. | |
image_col | no | str | 'image_path' | See signature. |
label_col | no | str | 'label_path' | See signature. |
case_id_col | no | str | 'case_id' | See signature. |
split_col | no | str | 'split' | See signature. |
channel_names | no | dict[int or str, str] or Sequence[str] or None | None | See signature. |
labels | no | dict[int or str, str] or None | None | See signature. |
copy_mode | no | CopyMode | 'copy' | See signature. |
overwrite | no | bool | False | See signature. |
validate | no | bool | True | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.prepare_yolo_classification_dataset
Prepare a YOLO classification dataset from images, DICOM, or NIfTI.
Import path: fyron.datasets.preparation.prepare_yolo_classification_dataset
prepare_yolo_classification_dataset(manifest: pd.DataFrame | str | Path, output_dir: str | Path, image_col: str = 'image_path', class_col: str = 'class', split_col: str = 'split', sample_id_col: str | None = None, image_format: str = 'png', copy_mode: CopyMode = 'copy', dicom_window: tuple[float, float] | None = None, nifti_slice: int | Literal['middle', 'all'] = 'middle', overwrite: bool = False, validate: bool = True) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
manifest | yes | pd.DataFrame or str or Path | See signature. | |
output_dir | yes | str or Path | See signature. | |
image_col | no | str | 'image_path' | See signature. |
class_col | no | str | 'class' | See signature. |
split_col | no | str | 'split' | See signature. |
sample_id_col | no | str or None | None | See signature. |
image_format | no | str | 'png' | See signature. |
copy_mode | no | CopyMode | 'copy' | See signature. |
dicom_window | no | tuple[float, float] or None | None | See signature. |
nifti_slice | no | int or Literal['middle', 'all'] | 'middle' | See signature. |
overwrite | no | bool | False | See signature. |
validate | no | bool | True | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.prepare_yolo_detection_dataset
Prepare an Ultralytics-compatible YOLO object-detection dataset.
Import path: fyron.datasets.preparation.prepare_yolo_detection_dataset
prepare_yolo_detection_dataset(manifest: pd.DataFrame | str | Path, output_dir: str | Path, image_col: str = 'image_path', split_col: str = 'split', class_col: str = 'class', bbox_cols: Sequence[str] = ('x_min', 'y_min', 'x_max', 'y_max'), image_width_col: str | None = None, image_height_col: str | None = None, coord_format: Literal['xyxy_pixels'] = 'xyxy_pixels', sample_id_col: str | None = None, image_format: str = 'png', copy_mode: CopyMode = 'copy', dicom_window: tuple[float, float] | None = None, nifti_slice: int | Literal['middle', 'all'] = 'middle', overwrite: bool = False, validate: bool = True) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
manifest | yes | pd.DataFrame or str or Path | See signature. | |
output_dir | yes | str or Path | See signature. | |
image_col | no | str | 'image_path' | See signature. |
split_col | no | str | 'split' | See signature. |
class_col | no | str | 'class' | See signature. |
bbox_cols | no | Sequence[str] | ('x_min', 'y_min', 'x_max', 'y_max') | See signature. |
image_width_col | no | str or None | None | See signature. |
image_height_col | no | str or None | None | See signature. |
coord_format | no | Literal['xyxy_pixels'] | 'xyxy_pixels' | See signature. |
sample_id_col | no | str or None | None | See signature. |
image_format | no | str | 'png' | See signature. |
copy_mode | no | CopyMode | 'copy' | See signature. |
dicom_window | no | tuple[float, float] or None | None | See signature. |
nifti_slice | no | int or Literal['middle', 'all'] | 'middle' | See signature. |
overwrite | no | bool | False | See signature. |
validate | no | bool | True | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.validate_nnunetv2_dataset
Validate the expected files and names in an nnU-Net v2 dataset folder.
Import path: fyron.datasets.preparation.validate_nnunetv2_dataset
validate_nnunetv2_dataset(dataset_dir: str | Path) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
dataset_dir | yes | str or Path | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.validate_yolo_dataset
Validate a prepared YOLO classification or detection dataset.
Import path: fyron.datasets.preparation.validate_yolo_dataset
validate_yolo_dataset(dataset_dir: str | Path, task: Literal['detect', 'classify'] = 'detect') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
dataset_dir | yes | str or Path | See signature. | |
task | no | Literal['detect', 'classify'] | 'detect' | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.datasets.preparation.write_dataset_manifest
Write a dataset preparation manifest as CSV or JSON.
Import path: fyron.datasets.preparation.write_dataset_manifest
write_dataset_manifest(df: pd.DataFrame, output_path: str | Path) -> PathParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
output_path | yes | str or Path | See signature. |
Returns
Path
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader
Download documents from URLs into a deterministic folder structure.
Import path: fyron.documents.client.DocumentDownloader
DocumentDownloader(self, auth: Optional[Union[Auth, requests.Session]] = None, base_url: Optional[str] = None, output_dir: Union[str, pathlib.Path] = 'documents_out', timeout: int = 30, skip_existing: bool = True, log_downloads: bool = False, max_workers: int = 4, retries: Optional[Retry] = None, save_mode: str = 'auto', force_extension: Optional[str] = None, basic_auth: Optional[Tuple[str, str]] = None)Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
auth | no | Optional[Union[Auth, requests.Session]] | None | Optional Auth or requests.Session to reuse. |
base_url | no | Optional[str] | None | Optional base URL to prefix relative paths. |
output_dir | no | Union[str, pathlib.Path] | 'documents_out' | Parent folder where documents are stored. |
timeout | no | int | 30 | Request timeout in seconds. |
skip_existing | no | bool | True | Skip downloads if the target file already exists. |
log_downloads | no | bool | False | If True, logs each download. |
max_workers | no | int | 4 | See signature. |
retries | no | Optional[Retry] | None | See signature. |
save_mode | no | str | 'auto' | See signature. |
force_extension | no | Optional[str] | None | See signature. |
basic_auth | no | Optional[Tuple[str, str]] | None | Optional (user, password) tuple for basic auth (standalone). |
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
Public Methods
fyron.documents.client.DocumentDownloader.close
Close the underlying session if owned.
Import path: fyron.documents.client.DocumentDownloader.close
DocumentDownloader.close(self) -> NoneParameters
No parameters documented.
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader.download_id
Return a deterministic download ID for a URL.
Import path: fyron.documents.client.DocumentDownloader.download_id
DocumentDownloader.download_id(url: str) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
url | yes | str | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader.download_url
Download a single URL into its deterministic folder.
Import path: fyron.documents.client.DocumentDownloader.download_url
DocumentDownloader.download_url(self, url: str) -> DocumentResultParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
url | yes | str | See signature. |
Returns
DocumentResult
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader.download_urls
Download a list of URLs and return results as a DataFrame.
Import path: fyron.documents.client.DocumentDownloader.download_urls
DocumentDownloader.download_urls(self, urls: Iterable[str], results_csv: Optional[Union[str, pathlib.Path]] = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
urls | yes | Iterable[str] | See signature. | |
results_csv | no | Optional[Union[str, pathlib.Path]] | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader.download_from_dataframe
Download all URLs from a DataFrame column.
Import path: fyron.documents.client.DocumentDownloader.download_from_dataframe
DocumentDownloader.download_from_dataframe(self, df: pd.DataFrame, url_col: str = 'document_url', results_csv: Optional[Union[str, pathlib.Path]] = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
url_col | no | str | 'document_url' | See signature. |
results_csv | no | Optional[Union[str, pathlib.Path]] | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentDownloader.download_from_df
Short alias for download_from_dataframe.
Import path: fyron.documents.client.DocumentDownloader.download_from_df
DocumentDownloader.download_from_df(self, df: pd.DataFrame, url_col: str = 'document_url', results_csv: Optional[Union[str, pathlib.Path]] = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
url_col | no | str | 'document_url' | See signature. |
results_csv | no | Optional[Union[str, pathlib.Path]] | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.documents.client.DocumentResult
See the signature and linked module guide for context.
Import path: fyron.documents.client.DocumentResult
DocumentResult()Parameters
No parameters documented.
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
fyron.get_banner
See the signature and linked module guide for context.
Import path: fyron.get_banner
get_banner(version: str | None = None, *, include_version: bool = True, color: bool = True, theme: str = 'bf') -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
version | no | str or None | None | See signature. |
include_version | no | bool | True | See signature. |
color | no | bool | True | See signature. |
theme | no | str | 'bf' | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.get_run_footer
See the signature and linked module guide for context.
Import path: fyron.get_run_footer
get_run_footer(*args, **kwargs) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
args | yes | See signature. | ||
kwargs | yes | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.get_run_header
See the signature and linked module guide for context.
Import path: fyron.get_run_header
get_run_header(*args, **kwargs) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
args | yes | See signature. | ||
kwargs | yes | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent
Simple LLM agent for DataFrame and document directory workflows.
Import path: fyron.llm.agent.LLMAgent
LLMAgent(self, provider: Optional[str] = None, base_url: Optional[str] = None, api_key: Optional[str] = None, model: Optional[str] = None, timeout: Optional[int] = None, extra_headers: Optional[Dict[str, str]] = None, auth_required: Optional[bool] = None, verify_ssl: bool = True)Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
provider | no | Optional[str] | None | Provider mode: `openai, anyllm, or custom. Defaults to LLM_PROVIDER or openai`. |
base_url | no | Optional[str] | None | Provider base URL or custom endpoint. Defaults to `LLM_BASE_URL`. |
api_key | no | Optional[str] | None | Optional API key. Defaults to `LLM_API_KEY` and is sent as a bearer token when present. |
model | no | Optional[str] | None | Model name for the provider. Defaults to `LLM_MODEL`. |
timeout | no | Optional[int] | None | Request timeout in seconds. Defaults to `LLM_TIMEOUT` or 30. |
extra_headers | no | Optional[Dict[str, str]] | None | Additional HTTP headers merged into the session. |
auth_required | no | Optional[bool] | None | Whether an API key is required. Defaults to true for `openai and anyllm and false for custom`. |
verify_ssl | no | bool | True | Whether HTTPS certificate verification is enabled for requests. |
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
Public Methods
fyron.llm.agent.LLMAgent.prompt
Send a single prompt and return the model response.
Import path: fyron.llm.agent.LLMAgent.prompt
LLMAgent.prompt(self, user_prompt: str, *, image_path: Optional[str] = None, file_path: Optional[str] = None, mode: str = 'text') -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
user_prompt | yes | str | See signature. | |
image_path | no | Optional[str] | None | See signature. |
file_path | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.chat
Alias for prompt (kept for convenience).
Import path: fyron.llm.agent.LLMAgent.chat
LLMAgent.chat(self, user_prompt: str, *, image_path: Optional[str] = None, file_path: Optional[str] = None, mode: str = 'text') -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
user_prompt | yes | str | See signature. | |
image_path | no | Optional[str] | None | See signature. |
file_path | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.run_on_dataframe
Run a prompt over a DataFrame column and append results.
Import path: fyron.llm.agent.LLMAgent.run_on_dataframe
LLMAgent.run_on_dataframe(self, df: pd.DataFrame, text_col: str, prompt: str, output_col: str = 'llm_output', format_func: Optional[Callable[[str, Dict[str, Any]], str]] = None, image_col: Optional[str] = None, file_col: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | Input DataFrame. | |
text_col | yes | str | Column containing text to analyze. | |
prompt | yes | str | Prompt template. If format_func is not provided, text is appended. | |
output_col | no | str | 'llm_output' | Name of output column. |
format_func | no | Optional[Callable[[str, Dict[str, Any]], str]] | None | Optional function (text, row_dict) -> prompt string. |
image_col | no | Optional[str] | None | Optional column with image file paths or URLs. |
file_col | no | Optional[str] | None | Optional column with PDF file paths (OpenAI Responses only). |
mode | no | str | 'text' | "text", "image", "pdf", or "auto". |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.run_on_documents
Run a prompt over a list of documents (paths or raw strings).
Import path: fyron.llm.agent.LLMAgent.run_on_documents
LLMAgent.run_on_documents(self, documents: List[str], prompt: str, output_csv: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
documents | yes | List[str] | List of file paths or raw text strings. | |
prompt | yes | str | Prompt to apply to each document. | |
output_csv | no | Optional[str] | None | Optional path to write results as CSV. |
mode | no | str | 'text' | "text", "image", "pdf", or "auto". |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.prompt_documents
Short alias for run_on_documents.
Import path: fyron.llm.agent.LLMAgent.prompt_documents
LLMAgent.prompt_documents(self, documents: List[str], prompt: str, output_csv: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
documents | yes | List[str] | See signature. | |
prompt | yes | str | See signature. | |
output_csv | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.prompt_dataframe
Run a prompt over a DataFrame column and optionally save results.
Import path: fyron.llm.agent.LLMAgent.prompt_dataframe
LLMAgent.prompt_dataframe(self, df: pd.DataFrame, text_col: str, prompt: str, output_col: str = 'llm_output', output_csv: Optional[str] = None, format_func: Optional[Callable[[str, Dict[str, Any]], str]] = None, image_col: Optional[str] = None, file_col: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
text_col | yes | str | See signature. | |
prompt | yes | str | See signature. | |
output_col | no | str | 'llm_output' | See signature. |
output_csv | no | Optional[str] | None | See signature. |
format_func | no | Optional[Callable[[str, Dict[str, Any]], str]] | None | See signature. |
image_col | no | Optional[str] | None | See signature. |
file_col | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.prompt_df
Short alias for prompt_dataframe.
Import path: fyron.llm.agent.LLMAgent.prompt_df
LLMAgent.prompt_df(self, df: pd.DataFrame, text_col: str, prompt: str, output_col: str = 'llm_output', output_csv: Optional[str] = None, format_func: Optional[Callable[[str, Dict[str, Any]], str]] = None, image_col: Optional[str] = None, file_col: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
text_col | yes | str | See signature. | |
prompt | yes | str | See signature. | |
output_col | no | str | 'llm_output' | See signature. |
output_csv | no | Optional[str] | None | See signature. |
format_func | no | Optional[Callable[[str, Dict[str, Any]], str]] | None | See signature. |
image_col | no | Optional[str] | None | See signature. |
file_col | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.run_prompt_on_dataframe
Backward-compatible alias for prompt_dataframe.
Import path: fyron.llm.agent.LLMAgent.run_prompt_on_dataframe
LLMAgent.run_prompt_on_dataframe(self, df: pd.DataFrame, text_col: str, prompt: str, output_col: str = 'llm_output', output_csv: Optional[str] = None, format_func: Optional[Callable[[str, Dict[str, Any]], str]] = None, image_col: Optional[str] = None, file_col: Optional[str] = None, mode: str = 'text') -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | See signature. | |
text_col | yes | str | See signature. | |
prompt | yes | str | See signature. | |
output_col | no | str | 'llm_output' | See signature. |
output_csv | no | Optional[str] | None | See signature. |
format_func | no | Optional[Callable[[str, Dict[str, Any]], str]] | None | See signature. |
image_col | no | Optional[str] | None | See signature. |
file_col | no | Optional[str] | None | See signature. |
mode | no | str | 'text' | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.describe_python_file
Generate a scientific-methods style description of a Python file.
Import path: fyron.llm.agent.LLMAgent.describe_python_file
LLMAgent.describe_python_file(self, file_path: str | pathlib.Path, output_md: str | pathlib.Path, prompt: Optional[str] = None) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
file_path | yes | str or pathlib.Path | Path to the Python file to analyze. | |
output_md | yes | str or pathlib.Path | Path to write the markdown summary. | |
prompt | no | Optional[str] | None | Optional prompt override. |
Returns
str
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.run_on_directory
Run a prompt over all files in a directory.
Import path: fyron.llm.agent.LLMAgent.run_on_directory
LLMAgent.run_on_directory(self, input_dir: str | pathlib.Path, prompt: str, glob: str = '*.txt', mode: str = 'text') -> Dict[str, str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
input_dir | yes | str or pathlib.Path | See signature. | |
prompt | yes | str | See signature. | |
glob | no | str | '*.txt' | See signature. |
mode | no | str | 'text' | See signature. |
Returns
Dict[str, str]
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMAgent.prompt_directory
Short alias for run_on_directory.
Import path: fyron.llm.agent.LLMAgent.prompt_directory
LLMAgent.prompt_directory(self, input_dir: str | pathlib.Path, prompt: str, glob: str = '*.txt', mode: str = 'text') -> Dict[str, str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
input_dir | yes | str or pathlib.Path | See signature. | |
prompt | yes | str | See signature. | |
glob | no | str | '*.txt' | See signature. |
mode | no | str | 'text' | See signature. |
Returns
Dict[str, str]
See also: Core, Publication, And Utility module guide.
fyron.llm.agent.LLMConfig
See the signature and linked module guide for context.
Import path: fyron.llm.agent.LLMConfig
LLMConfig()Parameters
No parameters documented.
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.PaletteSpec
Metadata for one named scientific color palette.
Import path: fyron.plotting_palettes.PaletteSpec
PaletteSpec()Parameters
No parameters documented.
Returns
Class constructor.
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.get_colormap
Return a Matplotlib colormap from a named sequential/diverging palette.
Import path: fyron.plotting_palettes.get_colormap
get_colormap(name: str = 'fyron_sequential_blue', *, reverse: bool = False) -> LinearSegmentedColormapParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name | no | str | 'fyron_sequential_blue' | See signature. |
reverse | no | bool | False | See signature. |
Returns
LinearSegmentedColormap
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.get_palette
Return a named scientific palette as hex colors.
Import path: fyron.plotting_palettes.get_palette
get_palette(name: str = 'okabe_ito', n: int | None = None, *, reverse: bool = False) -> list[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name | no | str | 'okabe_ito' | See signature. |
n | no | int or None | None | See signature. |
reverse | no | bool | False | See signature. |
Returns
list[str]
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.list_palettes
List available Fyron scientific palettes.
Import path: fyron.plotting_palettes.list_palettes
list_palettes(kind: str | None = None) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
kind | no | str or None | None | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.palette_grayscale_contrast
Return adjacent luminance differences for grayscale readability checks.
Import path: fyron.plotting_palettes.palette_grayscale_contrast
palette_grayscale_contrast(name_or_colors: str | Sequence[str]) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name_or_colors | yes | str or Sequence[str] | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.palette_luminance_table
Return luminance and text-color guidance for a palette.
Import path: fyron.plotting_palettes.palette_luminance_table
palette_luminance_table(name_or_colors: str | Sequence[str]) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name_or_colors | yes | str or Sequence[str] | See signature. |
Returns
pd.DataFrame
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.preview_palette
Preview a named palette as labeled swatches.
Import path: fyron.plotting_palettes.preview_palette
preview_palette(name: str, n: int | None = None, *, save_path: str | Path | None = None) -> tuple[Any, Any]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
name | yes | str | See signature. | |
n | no | int or None | None | See signature. |
save_path | no | str or Path or None | None | See signature. |
Returns
tuple[Any, Any]
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.resolve_colormap
Resolve a Fyron colormap name or pass through any Matplotlib colormap.
Import path: fyron.plotting_palettes.resolve_colormap
resolve_colormap(cmap: str | Any) -> AnyParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
cmap | yes | str or Any | See signature. |
Returns
Any
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.resolve_palette
Resolve a named or explicit palette to `n` colors.
Import path: fyron.plotting_palettes.resolve_palette
resolve_palette(palette: str | Sequence[str] | None, n: int, *, default: str = 'okabe_ito') -> list[str]Parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
palette | yes | str or Sequence[str] or None | See signature. | |
n | yes | int | See signature. | |
default | no | str | 'okabe_ito' | See signature. |
Returns
list[str]
See also: Core, Publication, And Utility module guide.
fyron.plotting_palettes.set_plot_style
Set Fyron Matplotlib defaults for publication figures.
Import path: fyron.plotting_palettes.set_plot_style
set_plot_style(style: str = 'paper', palette: str = 'okabe_ito') -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
style | no | str | 'paper' | See signature. |
palette | no | str | 'okabe_ito' | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.print_banner
See the signature and linked module guide for context.
Import path: fyron.print_banner
print_banner(version: str | None = None, *, include_version: bool = True, color: bool = True, theme: str = 'bf', file: TextIO | None = None) -> NoneParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
version | no | str or None | None | See signature. |
include_version | no | bool | True | See signature. |
color | no | bool | True | See signature. |
theme | no | str | 'bf' | See signature. |
file | no | TextIO or None | None | See signature. |
Returns
None
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.cohort_flow_table
Create a simple cohort flow table from named analysis steps.
Import path: fyron.reporting.tables.cohort_flow_table
cohort_flow_table(steps: Sequence[Mapping[str, Any]] | pd.DataFrame) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
steps | yes | Sequence[Mapping[str, Any]] or pd.DataFrame | Ordered step records with at least `step or label and n. Optional excluded and reason` values are preserved or derived. |
Returns
pandas.DataFrame - Ordered flow table with step number, label, count, excluded count, and exclusion reason.
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.compare_models_table
Combine multiple model result objects into one paper-ready metrics table.
Import path: fyron.reporting.tables.compare_models_table
compare_models_table(results: Mapping[str, Any] | Sequence[Mapping[str, Any]], *, model_col: str = 'model', metrics_key: str = 'metrics', digits: int = 3) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
results | yes | Mapping[str, Any] or Sequence[Mapping[str, Any]] | Either `{"model name": result} or a sequence of result dictionaries. Each result may contain a metrics` dictionary or metric keys at top level. | |
model_col | no | str | 'model' | Name of the output model column. |
metrics_key | no | str | 'metrics' | Key containing the metric dictionary when present. |
digits | no | int | 3 | Decimal places for numeric metric columns. |
Returns
pandas.DataFrame - One row per model/result with rounded metric columns.
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.dataframe_to_markdown
Render a DataFrame as a plain Markdown table.
Import path: fyron.reporting.tables.dataframe_to_markdown
dataframe_to_markdown(df: pd.DataFrame, *, index: bool = False) -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | DataFrame to render. | |
index | no | bool | False | If True, include the DataFrame index as the first column. |
Returns
str - Markdown table string suitable for notes, reports, documentation, or pull-request review.
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.format_estimate_ci
Format an estimate and confidence interval for manuscript tables.
Import path: fyron.reporting.tables.format_estimate_ci
format_estimate_ci(estimate: float, lower: float, upper: float, *, digits: int = 2, separator: str = ' to ') -> strParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
estimate | yes | float | Point estimate, such as beta, odds ratio, hazard ratio, or metric value. | |
lower | yes | float | Lower confidence interval bound. | |
upper | yes | float | Upper confidence interval bound. | |
digits | no | int | 2 | Decimal places used for all numeric values. |
separator | no | str | ' to ' | Text placed between lower and upper confidence interval bounds. |
Returns
str - Formatted string such as `"1.24 (1.02 to 1.51)"`.
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.metrics_table
Normalize model metrics into a rounded report table.
Import path: fyron.reporting.tables.metrics_table
metrics_table(metrics: Mapping[str, Mapping[str, Any]] | pd.DataFrame, *, model_col: str = 'model', digits: int = 3) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
metrics | yes | Mapping[str, Mapping[str, Any]] or pd.DataFrame | Either a DataFrame that already contains metric columns, or a nested mapping such as `{"RF": {"auc": 0.82}}`. | |
model_col | no | str | 'model' | Name of the output column containing model names. |
digits | no | int | 3 | Decimal places used for numeric metric columns. |
Returns
pandas.DataFrame - One row per model or metric source with rounded numeric metric columns.
See also: Core, Publication, And Utility module guide.
fyron.reporting.tables.summarize_baseline_table
Create a compact baseline characteristics table.
Import path: fyron.reporting.tables.summarize_baseline_table
summarize_baseline_table(df: pd.DataFrame, *, group_col: str | None = None, continuous: Sequence[str] | None = None, categorical: Sequence[str] | None = None, digits: int = 1) -> pd.DataFrameParameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
df | yes | pd.DataFrame | Patient-level cohort or analysis table. | |
group_col | no | str or None | None | Optional column used to stratify summaries, such as treatment arm, risk group, cohort, or center. |
continuous | no | Sequence[str] or None | None | Continuous variables to summarize as mean and standard deviation. If omitted, numeric columns are selected automatically. |
categorical | no | Sequence[str] or None | None | Categorical variables to summarize as count and percent. If omitted, non-continuous columns are selected automatically. |
digits | no | int | 1 | Decimal places used in formatted summary strings. |
Returns
pandas.DataFrame - Long baseline table with variable, level, summary type, and one column per group or an overall column.
See also: Core, Publication, And Utility module guide.