Cli
cli
¶
app = typer.Typer(name=f'Ultimate Notion {__version__}', help='🚀 The ultimate Python client for Notion!')
module-attribute
¶
LogLevel
¶
config() -> None
¶
Display the current configuration file path and contents
info() -> None
¶
Display information about the Notion integration
main(log_level: Annotated[LogLevel, typer.Option(help='Log level')] = LogLevel.WARNING) -> None
¶
Shared options for all commands
setup_logging(log_level: LogLevel) -> None
¶
Setup basic logging
upload(file_name: Annotated[str, typer.Argument(help='Path to the file to upload')], notion_page: Annotated[str, typer.Argument(help='Page name or UUID to upload the file to')]) -> None
¶
Upload a file to a Notion page and append it as a block.
The file will be uploaded to Notion and appended to the specified page. The block type is automatically determined based on the file extension: - Images (.png, .jpg, .jpeg, .gif, .webp, etc.) → Image block - Videos (.mp4, .avi, .mov, .wmv, etc.) → Video block - PDFs (.pdf) → PDF block - All other files → File block
The page can be specified either by name or by UUID. If specified by name, the name must be unique (exact match).