Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_storage_memory Discord

Swarmauri Memory Storage Adapter

In-memory storage adapter for SwarmauriSDK workflows. This adapter is ideal for unit tests, demos, or short-lived workloads where you want to avoid persistent storage and rely entirely on process memory.

Features

  • Keeps uploaded artifacts in an in-memory dictionary for fast access.
  • Supports optional key prefixes to scope uploads and downloads.
  • Provides helper methods for bulk upload/download operations.
  • Emits memory:// URIs so downstream components can trace stored artifacts.
  • Supports Python 3.10 through 3.12.

Installation

Install the package with your preferred Python packaging tool:

uv pip install swarmauri_storage_memory
pip install swarmauri_storage_memory

Usage

import io

from swarmauri_storage_memory import MemoryStorageAdapter

adapter = MemoryStorageAdapter(prefix="session")

uri = adapter.upload("example.txt", io.BytesIO(b"hello"))
print("Stored at:", uri)

downloaded = adapter.download("example.txt").read().decode("utf-8")
print("Contents:", downloaded)

keys = list(adapter.iter_prefix(""))
print("Keys:", keys)

The adapter above stores data purely in memory, making it suitable for lightweight or ephemeral workflows. Use upload_dir and download_dir for bulk transfers when you need to stage many artifacts in memory at once.

Want to help?

If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.

Release files for swarmauri_storage_memory 0.11.0.dev1

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

Source distribution (sdist)

Source distribution for swarmauri_storage_memory 0.11.0.dev1
File Size Uploaded
swarmauri_storage_memory-0.11.0.dev1.tar.gz 7.7 kB Details

Built distribution (wheel)

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

Total release size: 16.4 kB

Release files / swarmauri_storage_memory-0.11.0.dev1.tar.gz

Download URL swarmauri_storage_memory-0.11.0.dev1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8911e44ee878a4188d5718fdbeee25257a552103a03f680ca3389da11baca6e8
BLAKE2b-256 checksum
How to use checksums
c3aa9f1ba9aa2a2e7af918d6a4c99a53814e33f38ef52e73c6a95f4ef0478c1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_storage_memory-0.11.0.dev1-py3-none-any.whl

Download URL swarmauri_storage_memory-0.11.0.dev1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a54b266f002805d548aecc8fab2be72f4df381f4e584de1a986210d7f06eac6d
BLAKE2b-256 checksum
How to use checksums
4c509e87c4dd5f30f6293a796b7e0e9a90110af232f8059c71de06d500838f16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
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