Bandersnatch documentation¶
bandersnatch is a PyPI mirror client according to PEP 381 https://www.python.org/dev/peps/pep-0381/.
Bandersnatch hits the XMLRPC API of pypi.org to get all packages with serial or packages since the last run’s serial. bandersnatch then uses the JSON API of PyPI to get shasums and release file paths to download and workout where to layout the package files on a POSIX file system.
As of 6.0:
Supports PEP691 - HTML + JSON Simple Index
As of 4.0:
Is fully asyncio based (mainly via aiohttp)
Only stores PEP503 nomalized packages names for the /simple API
Only stores JSON in normalized package name path too
Command line usage¶
PyPI PEP 381 mirroring client.
bandersnatch [-h] [--version] [-c CONFIG] [--debug] {delete,mirror,verify,sync} ...
bandersnatch options¶
bandersnatch delete¶
Consulte metadata (locally or remotely) and delete entire package artifacts.
bandersnatch delete [-h] [--dry-run] [--workers WORKERS] [pypi_packages ...]
bandersnatch delete positional arguments¶
pypi_packages
(default:None
)
bandersnatch delete options¶
bandersnatch mirror¶
Performs a one-time synchronization with the PyPI master server.
bandersnatch mirror [-h] [--force-check]
bandersnatch mirror options¶
--force-check
- Force bandersnatch to reset the PyPI serial (move serial file to /tmp) to perform a full sync
bandersnatch verify¶
Read in Metadata and check package file validity
bandersnatch verify [-h] [--delete] [--dry-run] [--json-update] [--workers WORKERS]
bandersnatch verify options¶
bandersnatch sync¶
Synchronize specific packages with the PyPI master server.
bandersnatch sync [-h] [--skip-simple-root] package [package ...]
bandersnatch sync positional arguments¶
package
- The name of package to sync (default:None
)
bandersnatch sync options¶
--skip-simple-root
- Skip updating simple index root page
Contents¶
- Installation
- Storage options for bandersnatch
- Mirror Configuration
- Examples
- Option Reference
- Folder Structures
- Default Configuration File
- Mirror filtering
- Serving your Mirror
- Contributing
- bandersnatch
- bandersnatch package
- Package contents
- Submodules
- bandersnatch.configuration module
- bandersnatch.delete module
- bandersnatch.filter module
- bandersnatch.log module
- bandersnatch.main module
- bandersnatch.master module
- bandersnatch.mirror module
- bandersnatch.package module
- bandersnatch.storage module
- bandersnatch.utils module
- bandersnatch.verify module
- bandersnatch_filter_plugins package
- Package contents
- Submodules
- bandersnatch_filter_plugins.blocklist_name module
- bandersnatch_filter_plugins.filename_name module
- bandersnatch_filter_plugins.latest_name module
- bandersnatch_filter_plugins.metadata_filter module
- bandersnatch_filter_plugins.prerelease_name module
- bandersnatch_filter_plugins.regex_name module
- bandersnatch_filter_plugins.allowlist_name module
- bandersnatch_storage_plugins package
- bandersnatch package