Archive Manager
Archive Manager is a Python tool designed to help users interact with and manage large archives of files efficiently. Whether you need to sort files, find duplicates, perform equality checks, or remove unnecessary files, this tool provides the necessary functionalities to streamline your file management tasks.
Core concepts and explanation:
- Archyves are wrappers for built in generators that enable the user to loop through directories revursively.
- To represent each item that the archyve finds, we have Entry objects - these are wrappers for Path objects that enable some useful features like hashing, sorting etc.
Features
- Sorting: Organize your files based on various criteria such as file type, size, date modified, etc.
- Duplicate Finding: Identify and manage duplicate files to free up storage space.
- Equality Checking: Compare files to ensure they are identical or different.
- Removal Tools: Safely remove unwanted files from your archives.
Installation
pip install archyve
Examples
Below are some examples of how to use archyve.
-
Find duplicates in a large library of images:
from archyve import Archyve, Entry # Create an archyve archyve: Archyve = Archyve(r"<put your path(s) here>") # Get a list of all the duplicate images and videos archyve = archyve.images + archyve.videos duplicate_lists: list[list[Entry]] = archyve.duplicates() # Sort the duplicates by age for i in range(len(duplicate_lists)): duplicate_lists[i] = sorted(duplicate_lists[i], key=lambda e: e.created) # Delete the ones that are not the oldest delete: list[list[Entry]] = [duplicate_list[1:] for duplicate_list in duplicate_lists] for entry_list in delete: archyve.delete(entry_list)
-
Get a list of all non-text files recursively in a given directory:
from archyve import Archyve, EntryType # Create an archyve archyve: Archyve = Archyve(r"p1", r"p2") # Filter the archyve entries on whatever you need archyve = archyve.filter(lambda e: not e.is_type(EntryType.TEXT)) # Loop through the archyve and print the entries for entry in archyve: print(entry)
Metadata
Release files for archyve 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| archyve-0.2.8.tar.gz | 2.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| archyve-0.2.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 MB
Release files / archyve-0.2.8.tar.gz
| Download URL | archyve-0.2.8.tar.gz |
|---|---|
| Size | 2.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e874a2050bfac2758b2db299b1e8c0decaf6bbe59ce05d64b61f121fbd5cb5f
|
|
BLAKE2b-256 checksum How to use checksums |
e00b17423abac04bfa42e3a7a7cdbc7ed7a8e895e95ad478bab84349106cad35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Windows/11
|
Release files / archyve-0.2.8-py3-none-any.whl
| Download URL | archyve-0.2.8-py3-none-any.whl |
|---|---|
| Size | 2.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c71f92af58353a2e1c6cf3efc8a0b96fe9c59126aad637d40ef454eafe574373
|
|
BLAKE2b-256 checksum How to use checksums |
e437edd66d97887a7038638b528c96785e489ea9a9e1c47c8ce7292838fd1cf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.2 Windows/11
|