Skip to content

Design

The package is organized as:

Credentials live in ~/.xnatcli/credentials.cfg, a plain-text configparser file with a single [xnatcli] section storing server, username, and password. The file is created via os.open with mode 0o600 and re-chmod-ed to 0o600 after writing so only the owner can read or write it. (On Windows, os.chmod only toggles the read-only bit — the permissions model there is ACL-based; the 0o600 call still runs for portability.)