Skip to main content

This library is not that useful. Perhaps someday it will become great.

Project description

SFManager

PyPI version

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, image 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 - print in terminal information about library

[!NOTE] Create filemanager object

import sfmanager

f = sfmanager.FileManager(filename="data.txt", level=5)

filename - filename or path to file
level - access level, where 1 - 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, where text - 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, where text - 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, where dst - directory and/or name for new file
rename - rename file, where name - new name
move - move file to another directory, where dst - new directory and/or new file name
delete - remove file

That's all. Stay tuned!

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

sfmanager-0.1.3.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sfmanager-0.1.3-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file sfmanager-0.1.3.tar.gz.

File metadata

  • Download URL: sfmanager-0.1.3.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for sfmanager-0.1.3.tar.gz
Algorithm Hash digest
SHA256 dfe95822f4bae5707c42b8f73f1584b2b253201d844793fe877bcd607ed65879
MD5 42d72b31da8eb1d77aba86ddf08f144d
BLAKE2b-256 eda48e8a4969159fbdda914bc60418b2c1c308f6fa5511d7d5c3c8a991746b2c

See more details on using hashes here.

File details

Details for the file sfmanager-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sfmanager-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for sfmanager-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e9f0a49cdce22622c7d55c924d8266b89cb43760140f87e84a1251ef6f75a87
MD5 67e1adc831608b3528e502560fe95895
BLAKE2b-256 f19b28f4825b07d65d5543ba97d98bc03c3814e68d79d8d93ed061cc9a8d8799

See more details on using hashes here.

Supported by

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