Skip to main content

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

  1. Install filelibrary package
pip install filelibrary
  1. You're done! Now all there is to do is read the documentation.

Documentation

  1. Load Package
from filelibrary import filelibrary

fileLibrary = filelibrary("path")
  1. Get files in path
files = fileLibrary.getFileList()
print(files) # prints every files in the specified path
  1. Get directories in path
dirs = fileLibrary.getDirList()
print(dirs) # prints every directories in the specified path
  1. Print all (prints files and directories)
fileLibrary.printAll()
  1. Read file
fileLibrary.openFile("fileName.extension")
# fileLibrary.openFile("test.txt")
  1. Write file
fileLibrary.writeFile("fileName.extension", "just a text here")
# fileLibrary.writeFile("test.txt", "just a text here")
  1. Read file as JSON
fileLibrary.openFileAsJson("fileName.extension")
# fileLibrary.openFileAsJson("test.json")
  1. 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


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 hashes)

Uploaded Source

Built Distribution

filelibrary-0.0.2-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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