Skip to main content

SyncList - список Python с автоматической синхронизацией данных с файлом JSON.

Project description

SyncList

SyncList is a Python list with automatic synchronization of data with a JSON file. This can be useful in cases where you need to save data between program sessions or if you need to save the state of data in real time.

Installation

You can install SyncList using pip:

pip install sync_list

Usage

from sync_list import SyncList

# Creating SyncList object with initial data
my_list = SyncList([1, 2, 3])

# Adding elements
my_list.append(4)
my_list.extend([5, 6])

# Inserting an element
my_list.insert(3, 0)

# Removing an element
my_list.remove(2)

# Accessing an element by index
print(my_list[0])  # 1

# Changing an element
my_list[0] = 0

# Sorting the list
my_list.sort()

# Reversing the list
my_list.reverse()

When the sync() method is called, the data in the list will be written to a file in JSON format. On the next program run, the data will be loaded from the file and available for use in the SyncList object.

Developers

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

sync_list-1.2.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

sync_list-1.2.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file sync_list-1.2.0.tar.gz.

File metadata

  • Download URL: sync_list-1.2.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for sync_list-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bbb3a77c2cb9707e2067cb682e9b9e3e6955a63a48733e191dc876e641559612
MD5 f8df7143b2ee39ef7ce6dd57d6f871d3
BLAKE2b-256 b46b4639992cd655d1e0d39149c89b41873adb2fd6e657c78732e70938378cc4

See more details on using hashes here.

File details

Details for the file sync_list-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: sync_list-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure

File hashes

Hashes for sync_list-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c44ea9d0ff1a6a6c4b3fd1910530922f26da3354d5b9b7b75911c9e5e566fe2
MD5 6e7874f1f9b052abfdd2d2385319ab22
BLAKE2b-256 94ee003f1e73b8776f0b357410a3d5ce3c57e4d9b34699b6c3abd8c11828ac3d

See more details on using hashes here.

Supported by

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