SSE-BSA
This is a Python library to read and write BSA (archive) files for Skyrim Special Edition.
See here for more information about the BSA file specification: https://en.uesp.net/wiki/Skyrim_Mod:Archive_File_Format
Installation
Run pip install sse-bsa to install the library and its dependencies in the current active environment.
Usage
Load an archive
>>> archive = BSAArchive(Path("my_archive.bsa"))
Get a list of all files in the archive
>>> archive.files
["interface/translations/test.txt", "textures/test/test.png"]
Search for files that match a specified pattern (glob)
>>> archive.glob("interface/translations/*.txt")
["interface/translations/test.txt"]
Extract a single file from the archive to a specified destination folder
(this maintains its folder structure)
>>> archive.extract_file("interface/translations/test.txt", Path("output"))
For eg. the extracted file would be located at output/interface/translations/test.txt.
Extract the entire content of the archive to a specified destination folder
(this also maintains the archive's folder structure)
>>> archive.extract(Path("output"))
The entire archive folder structure would be extracted to output.
Get an in-memory stream of a file without extracting it to disk
>>> archive.get_file_stream("interface/translations/test.txt").read()
b'This is a test'
Create a new archive with the content of a specified input folder
>>> BSAArchive.create_archive(Path("input"), Path("new_archive.bsa"))
The entire folder structure of input gets maintained when packing in the new_archive.bsa.
Metadata
Release files for sse-bsa 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sse_bsa-1.1.0.tar.gz | 2.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sse_bsa-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / sse_bsa-1.1.0.tar.gz
| Download URL | sse_bsa-1.1.0.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f7329dd3894588687229cfa5e22023154e54a548f76797a384626ea2d588004
|
|
BLAKE2b-256 checksum How to use checksums |
4fd06932badd71d68b45b36615a1accc29adee5d54381fae1c574a2d71136161
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / sse_bsa-1.1.0-py3-none-any.whl
| Download URL | sse_bsa-1.1.0-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b433b06ac43cc51b6b519f3164c63732efd2ace0d05555cbdc73852521260755
|
|
BLAKE2b-256 checksum How to use checksums |
32c00a9932c38391d6e887156fb3ded29efaf201e54d7c74e4c8ecc348553f5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|