No project description provided
Project description
dirlib
dirlib is a minimum library for getting a directory that is used by putting on configuration files. This is inspired by Golang standard library function called os.UserConfigDir(). Currently, Windows, Unix and macOS are supported.
Installation
pip install dirlib
How to use
import dirlib
# On Windows
print(dirlib.user_config_dir()) #=> %AppData% or %UserProfile%
# On Unix
print(dirlib.user_config_dir()) #=> $XDG_CONFIG_HOME or $HOME/.config
# On macOS
print(dirlib.user_config_dir()) #=> $HOME/Libary/Application Support
user_config_dir() can pass the two arguments. The first one is an application name. Here is an example on Windows.
import dirlib
app_name = "mysupercooltool"
print(dirlib.user_config_dir(app_name)) #=> C:\Users\chihiro\AppData\Roaming\mysupercooltool
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 Distribution
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 dirlib-1.2.0.tar.gz.
File metadata
- Download URL: dirlib-1.2.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab2964afb51b7f6ccc596ad904f5e8beb2a0f7bcec5787f4055fa5d28b668acb
|
|
| MD5 |
dc9cddd4bb41157988d1966b1969ffe8
|
|
| BLAKE2b-256 |
b72e827015ff4f380df34dc66b9cd20374617180a9188927331c468a7c1ba56c
|
File details
Details for the file dirlib-1.2.0-py3-none-any.whl.
File metadata
- Download URL: dirlib-1.2.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6d68ed46d4d17af167a18148cbeb23128275c2f9e46eac4d1accf7849d4a077
|
|
| MD5 |
620e217bad56c122c4a5a414bd1dc65b
|
|
| BLAKE2b-256 |
ad309f1d9a9a626f41b65e5db9e5ad0daeff68a7c3bedb8c9d8c73032c08124b
|