Skip to main content

Python reader and writer for the Space64 encrypted local archive format.

Project description

space64-local-archive

Python reader and writer for the Space64 encrypted local archive container used by Space64 apps.

This package is intended to mirror the Space64 encrypted local archive container format closely enough for maintenance tools, import/export jobs, diagnostics, and future cross-language workflows.

Status

Alpha. The file format is compatible with the Dart package's append-only container format, including:

  • PBKDF2-HMAC-SHA256 key derivation
  • AES-256-GCM encrypted records
  • append-only metadata/index snapshots
  • attachment and blob records
  • optional per-record zlib compression
  • recovery by copying the latest readable footer snapshot

The Python API is intentionally low-level: callers provide app manifest/data JSON dictionaries plus attachment/blob bytes. App-specific schema migration still belongs to the app.

Install

pip install space64-local-archive

For local development:

python -m pip install -e ".[dev]"
pytest

Example

from space64_local_archive import (
    EncryptedLocalArchive,
    LocalArchiveFormat,
)

fmt = LocalArchiveFormat.app_profile(
    app_id="my_app",
    file_magic="MYARCHIVE2",
)

repo = EncryptedLocalArchive(fmt)
repo.create(
    "example.myarchive",
    password="correct horse battery staple",
    manifest={
        "format": "my_app.archive",
        "format_version": 1,
        "schema_version": 1,
        "archive_id": "archive_1",
        "created_at": "2026-05-28T00:00:00.000Z",
        "updated_at": "2026-05-28T00:00:00.000Z",
        "app": {"name": "My App"},
        "encryption": {
            "status": "encrypted",
            "container": "my_app.chunked_encrypted_package",
            "kdf": "PBKDF2-HMAC-SHA256",
            "cipher": "AES-256-GCM",
        },
        "data_entry": "data.json",
        "attachments_root": "attachments/originals",
        "migrations": [],
        "metadata": {},
    },
    data={"schema_version": 1, "title": "Hello"},
)

opened = repo.open("example.myarchive", password="correct horse battery staple")
print(opened.data["title"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

space64_local_archive-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

space64_local_archive-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file space64_local_archive-0.1.0.tar.gz.

File metadata

  • Download URL: space64_local_archive-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for space64_local_archive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 953cf0dc73013661dda4294262bc979560b27507e541ce702f4da199568a5eff
MD5 fa795f1427607bf76721b718e6058184
BLAKE2b-256 464a8b1de0127426f0d49fd3a6457084532ae174d1feab0ef65d4c472af06afd

See more details on using hashes here.

Provenance

The following attestation bundles were made for space64_local_archive-0.1.0.tar.gz:

Publisher: publish-python.yml on space64-team/space64-local-archive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file space64_local_archive-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for space64_local_archive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 956e46247751ee299f4230d0e619f7d0b4a986fe56093699f682cb0d8b7046bc
MD5 cf56d01f7be4bb50c419c65f30b0056a
BLAKE2b-256 5658ea9793e6febb68b308a925ed702bdbd26f0482a837d2007b381a4fb732c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for space64_local_archive-0.1.0-py3-none-any.whl:

Publisher: publish-python.yml on space64-team/space64-local-archive

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page