dirlib-1.2.0
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | dirlib-1.2.0 |
| نام | dirlib |
| نسخه کتابخانه | 1.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | owlinux1000 |
| ایمیل نویسنده | encry1024@gmail.com |
| آدرس صفحه اصلی | https://github.com/owlinux1000/dirlib |
| آدرس اینترنتی | https://pypi.org/project/dirlib/ |
| مجوز | MIT |
# 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
```python
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.
```python
import dirlib
app_name = "mysupercooltool"
print(dirlib.user_config_dir(app_name)) #=> C:\Users\chihiro\AppData\Roaming\mysupercooltool
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10,<4.0 | Python |
نحوه نصب
نصب پکیج whl dirlib-1.2.0:
pip install dirlib-1.2.0.whl
نصب پکیج tar.gz dirlib-1.2.0:
pip install dirlib-1.2.0.tar.gz