Skip to main content

Permission Check

A simple, cross-platform, lightweight utility to check permission of files and folders in Python.

Usage

  1. pip install permission-check
  2. from permission_check.permission_check import PermissionCheck
  3. file = PermissionCheck(path="path_to_your_file") (A FileNotFoundError will occur if the path is not an existing file or folder on the file system)

For checking Owner Permissions

Read

if file.owner.has_read(): print("Owner has read permissions"")

Write

if file.owner.has_write(): print("Owner has write permissions"")

Execute

if file.owner.has_execute(): print("Owner has execute permissions"")

For checking Group and Others user's Permissions

For checking Group and Other user's permissions just to file.group and file.others respectively. followed by the .has_all() or .has_read() or .has_write() or .has_execute() methods

Metadata

Release files for permission-check 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for permission-check 0.0.2
File Size Uploaded
permission_check-0.0.2.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for permission-check 0.0.2
File Interpreter ABI Platform
permission_check-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / permission_check-0.0.2.tar.gz

Download URL permission_check-0.0.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0a6f9da188726ad62b36c8500fd284fc67d51a0c8887ad38685d420e1d436c20
BLAKE2b-256 checksum
How to use checksums
3420ce62c1d944daa264d6f2d4a3a61cab1231fe6b576ce4c40b812909121955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / permission_check-0.0.2-py3-none-any.whl

Download URL permission_check-0.0.2-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d21036dec69d3297181102a0c069bbc0d58d7f274d01bae04512fd429d50bab
BLAKE2b-256 checksum
How to use checksums
35c1bc920ec6306ee203eefeb0093fab7b814abe05def287c2ed33976a208080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page