Skip to content

Dev-iL/notion-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notion-backup

Automate export of Notion workspace

Deprecation

The login system does not work occasionally. It seems to be blocked by a browser integrity check

Installation

pip install --upgrade notion-backup

Usage

Command line:

backup_notion --output-dir='.'

From Python:

from pathlib import Path

from notion_backup.backup_service import BackupService

space_id: str = "..."
block_id: str = "..."

serv = BackupService(Path.home())
payloads: dict[str, bytes] = serv.retrieve_block(space_id, block_id)

How it works

The script obtains an API token by requesting a temporary password to be sent to your email address.

Login information are stored in ~/.notion_backup.conf

The export zip is generated and downloaded to the specified directory, or unzipped in memory and returned.

About

Automate Notion workspace backup export

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.7%
  • Makefile 6.3%