Skip to main content

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

Metadata

Release files for dirlib 1.2.0

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

Source distribution (sdist)

Source distribution for dirlib 1.2.0
File Size Uploaded Provenance Actions
dirlib-1.2.0.tar.gz 2.6 kB Without provenance Details for dirlib-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dirlib 1.2.0
File Interpreter ABI Platform Actions
dirlib-1.2.0-py3-none-any.whl Python 3 none any Details for dirlib-1.2.0-py3-none-any.whl

Total release size: 5.3 kB

Release files / dirlib-1.2.0.tar.gz

Download URL dirlib-1.2.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab2964afb51b7f6ccc596ad904f5e8beb2a0f7bcec5787f4055fa5d28b668acb
BLAKE2b-256 checksum
How to use checksums
b72e827015ff4f380df34dc66b9cd20374617180a9188927331c468a7c1ba56c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.1 Windows/10

Release files / dirlib-1.2.0-py3-none-any.whl

Download URL dirlib-1.2.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6d68ed46d4d17af167a18148cbeb23128275c2f9e46eac4d1accf7849d4a077
BLAKE2b-256 checksum
How to use checksums
ad309f1d9a9a626f41b65e5db9e5ad0daeff68a7c3bedb8c9d8c73032c08124b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.11.1 Windows/10

Security for dirlib 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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