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.
Release files for win32path 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| win32path-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / win32path-0.1.0-py3-none-any.whl
| Download URL | win32path-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c99c6744e5a9eb37144ca590b49f38361ed1e902216be4645f4d7a49b9ebef9
|
|
BLAKE2b-256 checksum How to use checksums |
31d33b07c91fd3366c256f1946bab2590038f966dbf026a664dc390c5e246695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|