This library is not that useful. Perhaps someday it will become great.
Project description
SFManager
What new in 0.1.4?
- Added the abillity to work with any files independently of each other
- Added check updates on command
sfmanager
This library is not that useful. Perhaps someday it will become great.
Python super filemanager
SFManager - this is library for work with files!
By this library you can work with text and other files.
You can read, set, add and replace content in text files.
Also you can create, copy, move, rename and remove any files.
Examples
[!NOTE] Terminal commands
sfmanager
sfmanager- check updates and print in terminal information about library
Work with one file
[!NOTE] Create filemanager object
import sfmanager f = sfmanager.FileManager(filename="data.txt", level=5)
filename- filename or path to file
level- access level, where1- read only,2- add content(for text files only),3- replace and set content(for text files only),4- rename, copy, move file,5- remove file
[!NOTE] Work with text files
f.readline() # read one line(for text files only) - 1 level f.readlines() # read all lines as JSON array(text files only) - 1 level f.add(text="Hello world!", sep=" ") # add text to file (text files only) - 2 level f.replace(_from="Hello", _to="Hi") # replace certain text on another (ftext files only) - 3 level f.set(text="Hi friends!") # replace all content to another (text files only) - 3 level
readline- print one line from text file
readlines- print all lines from text file as array
add- add content to file, wheretext- new text,sep- separator between old and new content, DEFAULT = ""
replace- replace certain text on another, where_from- old text,_to- new text
set- replace all content in text file on another, wheretext- new text
[!NOTE] Work with any files
f.copy(dst="data2.txt") # - copy file with all metadata - 4 level f.rename(name="data1.txt") # rename file - 4 level f.move(dst="/home/pc/super.txt") # move file to another directory - 4 level f.delete() # remove file - 5 level
copy- copy file with all metadata, wheredst- directory and/or name for new file
rename- rename file, wherename- new name
move- move file to another directory, wheredst- new directory and/or new file name
delete- remove file
Work with all files
[!NOTE] Create filesmanager object
import sfmanager f = sfmanager.FilesManager(level=5)
level- access level, where1- read only,2- add content(for text files only),3- replace and set content(for text files only),4- rename, copy, move file,5- remove file
[!NOTE] Work with text files
f.readline(dst="data.txt") # read one line(for text files only) - 1 level f.readlines(dst="data.txt") # read all lines as JSON array(text files only) - 1 level f.add(dst="data.txt", text="Hello world!", sep=" ") # add text to file (text files only) - 2 level f.replace(dst="data.txt", _from="Hello", _to="Hi") # replace certain text on another (ftext files only) - 3 level f.set(dst="data.txt", text="Hi friends!") # replace all content to another (text files only) - 3 level
[!NOTE] Where
dst- path to and/or file name
readline- print one line from text file
readlines- print all lines from text file as array
add- add content to file, wheretext- new text,sep- separator between old and new content, DEFAULT = ""
replace- replace certain text on another, where_from- old text,_to- new text
set- replace all content in text file on another, wheretext- new text
[!NOTE] Work with any files
f.copy(dst="data.txt", new_dst="data2.txt") # - copy file with all metadata - 4 level f.rename(dst="data2.txt", name="data1.txt") # rename file - 4 level f.move(dst="super.txt", new_dst="/home/pc/super.txt") # move file to another directory - 4 level f.delete(dst="/home/pc/super.txt") # remove file - 5 level
[!NOTE] Where
dst- path to and/or file name
copy- copy file with all metadata, wherenew_dst- directory and/or name for new file
rename- rename file, wherename- new name
move- move file to another directory, wherenew_dst- new directory and/or new file name
delete- remove file
That's all. Stay tuned!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sfmanager-0.1.4.tar.gz.
File metadata
- Download URL: sfmanager-0.1.4.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c9ed616abd66a4682d1be4d5a566ee5567382f41c2136366ffded2ead803a9
|
|
| MD5 |
428eb1d07d19b7895d3b6e57161c4acb
|
|
| BLAKE2b-256 |
44974e6503f50a185e8a42b1826dfd1e6af4d7771fc581c599be5e8c9e26b7c5
|
File details
Details for the file sfmanager-0.1.4-py3-none-any.whl.
File metadata
- Download URL: sfmanager-0.1.4-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84838b5c671fa630863f63e92950e390cc5e2d3dd741e922a43fb067ed31de5b
|
|
| MD5 |
ed227cbaeee9c8bd295a0ac81c22a742
|
|
| BLAKE2b-256 |
1a30ef36a4f05c09e2e6d531a57a98b588ca83612c3570e4463c05c562e1ead3
|