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
- Azreil-OFD (fantom2413@gmail.com)
Release files for sync-list 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sync_list-1.2.0.tar.gz | 2.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sync_list-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 kB
Release files / sync_list-1.2.0.tar.gz
| Download URL | sync_list-1.2.0.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbb3a77c2cb9707e2067cb682e9b9e3e6955a63a48733e191dc876e641559612
|
|
BLAKE2b-256 checksum How to use checksums |
b46b4639992cd655d1e0d39149c89b41873adb2fd6e657c78732e70938378cc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure
|
Release files / sync_list-1.2.0-py3-none-any.whl
| Download URL | sync_list-1.2.0-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c44ea9d0ff1a6a6c4b3fd1910530922f26da3354d5b9b7b75911c9e5e566fe2
|
|
BLAKE2b-256 checksum How to use checksums |
94ee003f1e73b8776f0b357410a3d5ce3c57e4d9b34699b6c3abd8c11828ac3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-1037-azure
|