Easy to use and can be imported and used in any Python project.
Project description
Win32Path
The library is useful for managing and organizing file paths in a Windows environment.
Table of Contents
About
The win32path library is a simple Python library that
provides CRUD (Create, Read, Update, Delete) methods for managing file paths
on a Windows operating system. It stores the paths in a JSON file located at
%APPDATA%/Local/win32path/paths.json and allows the user to easily add,
retrieve, update and delete file paths using the provided methods. The library
is easy to use and can be imported and used in any Python project.
Getting Started
Here is a list of each class and method, along with their docstrings in English:
obj.list_paths(): Returns a list of all the registered paths.obj.get_path(key): Returns the path associated with the specified key.obj.set_path(key, value): Save the specified path for the specified key.obj.update_path(key, value): Updates the path associated with the specified key.obj.delete_path(key): Removes the path associated with the specified key.
Installing
from Pypi
pip install win32path
from Github :
pip install git+https://github.com/Emericdefay/win32path
Usage
# define object
>>> path = Win32Path()
>>> the_key = 'key'
>>> the_path = 'C:\\Users\\...\\Desktop'
# set a path
>>> path.set_path(the_key, the_path)
# get a path
>>> path.get_path(the_key)
'C:\\Users\\...\\Desktop'
# get all paths
>>> win32path.list_paths()
{ 'key': 'C:\\Users\\...\\Desktop'}
# update path
>>> new_path = 'C:\\Users\\...\\Downloads'
>>> path.update_path(the_key, new_path)
# delete path
>>> path.delete_path(the_key)
Authors
- @Emericdefay - Idea & Initial work
See also the list of contributors who participated in this project.
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file win32path-0.1.0-py3-none-any.whl.
File metadata
- Download URL: win32path-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c99c6744e5a9eb37144ca590b49f38361ed1e902216be4645f4d7a49b9ebef9
|
|
| MD5 |
e5034923d31e92421baee70f908356ed
|
|
| BLAKE2b-256 |
31d33b07c91fd3366c256f1946bab2590038f966dbf026a664dc390c5e246695
|