filelibrary is a simple package that allows you to get and edit files or directories in a specified path.
Project description
How to use filelibrary
- Install filelibrary package
pip install filelibrary
- You're done! Now all there is to do is read the documentation.
Documentation
- Load Package
from filelibrary import filelibrary
fileLibrary = filelibrary("path")
- Get files in path
files = fileLibrary.getFileList()
print(files) # prints every files in the specified path
- Get directories in path
dirs = fileLibrary.getDirList()
print(dirs) # prints every directories in the specified path
- Print all (prints files and directories)
fileLibrary.printAll()
- Read file
fileLibrary.openFile("fileName.extension")
# fileLibrary.openFile("test.txt")
- Write file
fileLibrary.writeFile("fileName.extension", "just a text here")
# fileLibrary.writeFile("test.txt", "just a text here")
- Read file as JSON
fileLibrary.openFileAsJson("fileName.extension")
# fileLibrary.openFileAsJson("test.json")
- Write file as JSON
fileLibrary.writeFileAsJson("fileName.extension", {"data": "here"})
# fileLibrary.writeFileAsJson("test.json", {"name": "John", "age": "30"})
Congratulations! You've finished the documentation. Explore the package and create awesome projects!
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
filelibrary-0.0.1.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file filelibrary-0.0.1.tar.gz
.
File metadata
- Download URL: filelibrary-0.0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb217abaff091fb63acce13d28ea12527230099a66dca166ae13f57fbb9e4425 |
|
MD5 | 6e933b328f2ddeaeaddc7f00f76737e4 |
|
BLAKE2b-256 | 45a7d24187fde401adb2967ef00af0bad82fd40b592b8bf90ee37bc3b21485f6 |
File details
Details for the file filelibrary-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: filelibrary-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22244d80d5abbf1e87dbbe554f9e4d538a61ac13ac0bbcab9fbadd7e3ed25cd5 |
|
MD5 | c403ae85f65be3fa09eb8c561d3f84dc |
|
BLAKE2b-256 | eef19c74e984ddba63505c8e15e2d61976b1f9afd2bb382f4956f97cfdbdf29c |