Skip to main content

This packages crates a simple way to work with, files, folders, images and pdfs.

Project description

Files, Folders, Images and PDFs

This Python package contains 4 different classes to work with files, folder, images and pdfs in your python developements for more information about how to develop your RPA projects with python check https://automatehub.es/

1. files.py

Class to handle files. Arguments:

  1. file_path (str): path to the file

Attributes:

  1. file_path (str): path to the file
  2. exists (bool): whether the file exists
  3. file_name (str): name of the file
  4. byte_size (int): size of the file in bytes
  5. creation_datetime (datetime): datetime of the file's creation
  6. modification_datetime (datetime): datetime of the file's last modification

Methods:

  1. rename(new_file_name): renames the file
  2. move(new_location): moves the file to a new location
  3. remove(): removes the file
  4. copy(new_location): copies the file to a new location
  5. wait_for_file_to_exist(timeout=10): waits for the file to exist

2. folders.py

Class to handle folders. If folder doesn't exist it automatically creates a new one. Arguments:

  1. path (str) -- path to folder to be instanced.

Attributes:

  1. path (str) -- path to folder to be instanced.
  2. name (str) -- name of folder

Methods:

  1. rename(new_folder_name) : Rename folder
  2. move(new_location): move folder to new location
  3. remove(allow_root=False, delete_read_only=True) : remove folder and all files and folders inside
  4. empty(allow_root=False): delete all files and folders in folder, receives allow_root as parameter
  5. copy(new_location=None) : Copy folder to new location
  6. subfolder_list(): list of subfolders
  7. file_list(): list of files in folder
  8. download_file(url, name=None): downloads file from url

3. images.py

Image Class, heritates from File class Attributes:

  1. size {tuple}: size of image
  2. format {str}: format of image

Methods:

  1. rotate(): rotate image
  2. resize(): resize image
  3. crop(): crop image
  4. mirrorH(): mirror image horizontally
  5. mirrorV(): mirror image vertically

3. pdfs.py

PDF Class Heritates from File Class Arguments:

  1. file_path (str): Path of the file

Attributes:

  1. file_path (str): Path of the file
  2. pages (int): number of pages in the file
  3. info (str): info of the file

Methods:

  1. read_pages(page_num, encoding=None): Returns a string with the text in the page
  2. append(pdf_document2,merge_path): Appends a pdf document to the current document
  3. split(): split pdf into several pdfs.

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

ibott-files-1.0.8.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

ibott_files-1.0.8-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file ibott-files-1.0.8.tar.gz.

File metadata

  • Download URL: ibott-files-1.0.8.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibott-files-1.0.8.tar.gz
Algorithm Hash digest
SHA256 3b31482c733211215cb1d581045b1a542188a250f351f74025ea9e9dd8286a91
MD5 4fff7182c6740ce4933658932d47cddc
BLAKE2b-256 057c19807bcdefd97805bf79ac8c14e1fe3ff44172a0dba0620d19505c4d7f16

See more details on using hashes here.

File details

Details for the file ibott_files-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: ibott_files-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibott_files-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 b0d044188e45ea8aab5254f2ff36f84930d65353a6fdb0b37bbd1b3426c8f35f
MD5 c2879474598a2352dc17da8156c2d7ea
BLAKE2b-256 ee2447b77012e1fd8133bd97a6a2a80db5e26171504d6398b6c756a093c52adf

See more details on using hashes here.

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