Skip to main content

Sotoki

Sotoki (Stack Overflow to Kiwix) is an openZIM scraper to create offline versions of Stack Exchange websites such as Stack Overflow.

It is based on Stack Exchange's Data Dumps hosted by The Internet Archive.

CodeFactor Docker License: GPL v3 PyPI version shields.io PyPI - Python Version

Usage

Sotoki works off a dump of a StackExchange website, as regularly created by StackExchange team. You must provide a --mirror to use to download this dump and the --domain you want to scrape.

For instance, to download Sports StackExchange website as of August 2024 and based on dump hosted on archive.org, you have to use --mirror https://archive.org/download/stackexchange_20240829 --domain sports.stackexchange.com. Value of mirror is hence continuously updated as new dumps are published by StackExchange team.

Other CLI parameters are mandatory:

  • --title: ZIM title, must be less than 30 chars. E.g. Gardening and Landscaping
  • --description: ZIM description, must be less than 80 chars

Docker

docker run -v my_dir:/output ghcr.io/openzim/sotoki sotoki --help

Installation

sotoki is a Python3 software. If you are not using the Docker image, you are advised to use it in a virtual environment to avoid installing software dependencies on your system.

python3 -m venv ./env  # creates a virtual python environment in ./env folder
./env/bin/pip install -U pip  # upgrade pip (package manager). recommended
./env/bin/pip install -U sotoki  # install/upgrade sotoki inside virtualenv

# direct access to in-virtualenv sotoki binary, without shell-attachment
./env/bin/sotoki --help
# alias or link it for convenience
sudo ln -s $(pwd)/env/bin/sotoki /usr/local/bin/

# alternatively, attach virtualenv to shell
source env/bin/activate
sotoki --help
deactivate  # unloads virtualenv from shell

Developers

Anybody is welcome to improve the Sotoki.

See CONTRIBUTING.md for setup instructions, code style guidelines, and changelog requirements.

Users

You don't have to make your own ZIM files of Stack Exchange's Web sites. Updated ZIM files are built on a regular basis for all of them. Look at https://library.kiwix.org/?category=stack_exchange to download them.

Metadata

Release files for sotoki 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sotoki 3.1.1
File Size Uploaded
sotoki-3.1.1.tar.gz 94.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sotoki 3.1.1
File Interpreter ABI Platform
sotoki-3.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 190.2 kB

Release files / sotoki-3.1.1.tar.gz

Download URL sotoki-3.1.1.tar.gz
Size 94.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ff2b5383c11dbcf062be79c9c8b89034a7442691210684c776d60d0610a29b94
BLAKE2b-256 checksum
How to use checksums
0f9f668240304a65d9a13dfa04730fb6b7bc1736a4e2a630ad8c9ad4894a47d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release files / sotoki-3.1.1-py3-none-any.whl

Download URL sotoki-3.1.1-py3-none-any.whl
Size 96.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a6524ddd3fabd6be6e501dbf367e05c5aefc46abc9b24142e0eaf0917071cc1
BLAKE2b-256 checksum
How to use checksums
60e3c1854225bebacac1f224f45c9ed9fcd83f2fe86afa4e9ff6c3a897aa93e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.1.1 This release

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.3.1

2 release files

1.3

2 release files

1.2.1

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.9.1

2 release files

0.9

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1.1

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page