{"id":24117069,"url":"https://github.com/picsart/shared-data-structures","last_synced_at":"2025-09-18T06:31:56.815Z","repository":{"id":45541105,"uuid":"246508244","full_name":"PicsArt/shared-data-structures","owner":"PicsArt","description":"Shared Memory Data Structures for Python","archived":false,"fork":false,"pushed_at":"2023-01-10T13:09:01.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-09T02:53:08.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PicsArt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-11T07:54:30.000Z","updated_at":"2023-05-12T08:50:37.000Z","dependencies_parsed_at":"2023-02-08T18:45:45.874Z","dependency_job_id":null,"html_url":"https://github.com/PicsArt/shared-data-structures","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicsArt%2Fshared-data-structures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicsArt%2Fshared-data-structures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicsArt%2Fshared-data-structures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PicsArt%2Fshared-data-structures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PicsArt","download_url":"https://codeload.github.com/PicsArt/shared-data-structures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233456108,"owners_count":18678963,"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":[],"created_at":"2025-01-11T07:38:14.346Z","updated_at":"2025-09-18T06:31:51.525Z","avatar_url":"https://github.com/PicsArt.png","language":"Python","readme":"# Shared Memory Data Structure\nThis package allows you to use your data structures like numpy arrays in the \nshared memory environment between two or more python processes. This library\nsimplifies the use of shared memory data structures as you don't need to manually\nmanage shared memory.\n\n# SharedArray example:\n## Process #1\n```python\nfrom shared_ds import SharedArray\n\n# Create shared memory and put you numpy array into that memory segment.\nshared_np_array = SharedArray.from_array(np_array)\n\nshm_descriptor = shared_np_array.to_json()\n\n```\n## Process #2\n```python\nfrom shared_ds import SharedArray\n\n# Attaches to existing shared memory and reads numpy array representation.\nshared_np_array = SharedArray.from_json(shm_descriptor)\n\nshm_descriptor = shared_np_array.to_json()\n\n```\n\n# io.BytesIO example:\n## Process #1\n```python\nfrom shared_ds import SharedBytesIO\nimport io\n\n# Create shared memory and put content of passed BytesIO into that memory segment.\ndata_to_store = io.BytesIO(b'data which we want to store')\nshared_memory = SharedBytesIO.from_bytes_io(data_to_store)\n\nshm_descriptor = shared_memory.to_json()\n\n```\n## Process #2\n```python\nfrom shared_ds import SharedBytesIO\n\n# Attaches to existing shared memory and gets io.BytesIO content.\nshared_memory = SharedBytesIO.from_json(shm_descriptor)\n\ndata = shared_memory.get_data()\n\n```\n\n### Currently supported data structures:\n- Numpy Array\n- io.BytesIO\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicsart%2Fshared-data-structures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicsart%2Fshared-data-structures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicsart%2Fshared-data-structures/lists"}