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.2.tar.gz
(3.1 kB
view details)
Built Distribution
File details
Details for the file filelibrary-0.0.2.tar.gz
.
File metadata
- Download URL: filelibrary-0.0.2.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 | ec7498d4ffb01937677f67b31997ab8e2f48493595805a4a59f3f7b6a103d544 |
|
MD5 | bd084540cebb5fac0f45a3c5dd5afe56 |
|
BLAKE2b-256 | ac674bf48f66f36810b8fad9c57f57e7859e219ea5c7d9c6ca2995491ca2cc37 |
File details
Details for the file filelibrary-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: filelibrary-0.0.2-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 | c915b9d1eaab457b8d12c2a12ba20605120200de14af60a5c29a1e6fe203f465 |
|
MD5 | 8271b67169c6f022ba14789acdc22ee9 |
|
BLAKE2b-256 | 885025a8e47d32ab12c25fe64f7e01cf3697cd3c74efb67261b240e6f1a83983 |