{"id":16654958,"url":"https://github.com/argmaster/magic-storage","last_synced_at":"2025-12-24T20:37:46.030Z","repository":{"id":50525021,"uuid":"519225444","full_name":"Argmaster/magic-storage","owner":"Argmaster","description":"Python 3 library which provides shortcuts for accessing file stored resources. It was designed to be used in tests for locally cached resources.","archived":false,"fork":false,"pushed_at":"2022-09-01T23:31:46.000Z","size":598,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T11:30:36.020Z","etag":null,"topics":["python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Argmaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-29T13:29:24.000Z","updated_at":"2022-08-07T21:05:18.000Z","dependencies_parsed_at":"2022-08-12T21:40:34.608Z","dependency_job_id":null,"html_url":"https://github.com/Argmaster/magic-storage","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argmaster%2Fmagic-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argmaster%2Fmagic-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argmaster%2Fmagic-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Argmaster%2Fmagic-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Argmaster","download_url":"https://codeload.github.com/Argmaster/magic-storage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243270134,"owners_count":20264214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python"],"created_at":"2024-10-12T09:51:36.755Z","updated_at":"2025-12-24T20:37:45.973Z","avatar_url":"https://github.com/Argmaster.png","language":"Python","readme":"\u003ch2 align=\"center\"\u003eMagic Storage cooler than you think!\u003c/h2\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.org/project/magic-storage/\"\u003e\u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/magic_storage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pycqa.github.io/isort/\"\u003e\u003cimg alt=\"isort\" src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/actions\"\u003e\u003cimg alt=\"Test Status\" src=\"https://github.com/Argmaster/magic-storage/workflows/Test%20suite%20CI%20run/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/actions\"\u003e\u003cimg alt=\"Docs Status\" src=\"https://github.com/Argmaster/magic-storage/workflows/Deploy%20documentation/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/actions\"\u003e\u003cimg alt=\"Docs Status\" src=\"https://github.com/Argmaster/magic-storage/workflows/Deploy%20documentation/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/magic-storage/\"\u003e\u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/magic-storage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/issues\"\u003e\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/Argmaster/magic-storage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/pulls\"\u003e\u003cimg alt=\"GitHub pull requests\" src=\"https://img.shields.io/github/issues-pr/Argmaster/magic-storage\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/Argmaster/magic-storage/blob/main/LICENSE\"\u003e\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/Argmaster/magic-storage\"\u003e\u003c/a\u003e\n    \u003cimg alt=\"GitHub tag (latest SemVer)\" src=\"https://img.shields.io/github/v/tag/Argmaster/magic-storage?label=version\"\u003e\n\u003c/p\u003e\n\nMagic storage is a Python library that provides tools to easily write, read and\ndelete resources for testing. This applies, of course, to resources that are\ndifficult to obtain but not very expensive to store locally and, in addition,\ndo not change. A good example are responses from REST APIs or at least those of\nthem that are not live data.\n\nThe library consists of a set of classes that implement storage using the file\nsystem and temporary storage in RAM. All tools can be accessed through the\nMagicStorage class.\n\n## Installing\n\nInstall and update using pip:\n\n```\n$ pip install -U magic_storage\n```\n\n## Example\n\n```python\nfrom typing import Any\nfrom magic_storage import MagicStorage\n\n\ndef very_expensive_get() -\u003e Any:\n    ...\n\n\nresponse = (\n    MagicStorage()\n    .filesystem(__file__)\n    .cache_if_missing(\"Nice thing\", lambda: very_expensive_get())\n)\n\n```\n\n## Documentation\n\nOnline documentation is available on\n[Github pages](https://argmaster.github.io/magic-storage/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaster%2Fmagic-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargmaster%2Fmagic-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargmaster%2Fmagic-storage/lists"}