Package: pypleasant
pypleasantpypleasantis a Python script and library which interfaces with
theAPIofPleasant Password Server.pleasant-cli/path/to/entry--password# print an entry's passwordpleasant-cli/path/to/entry--attachmentssecret_file.txt# download an attachmentpleasant-cli/path/to/entry--custom-fieldtest# print value of a custom fieldpleasant-cli36a9f39f-78a1-4ec5-ae1a-421d91f59d2a--password# alternatively you can also use the uuid of the entryRequirementspypleasant requires Python >= 3.6 and is only compatible with Pleasant Password ServerAPI v5.Installationpypleasant is available onPyPiand can be easily installed via pip:pipinstallpypleasantIn order to use the command-line clientpleasant-cli, ensure that yourPATHvariable includes
Python'sbindirectory (adapt if necessary):exportPATH+=":$HOME/.local/bin"Use the--helpswitch to check whether everything is setup correctly:pleasant-cli--helpAlternatively, pypleasant can be executed as a Python module without modifying thePATHvariable:python-mpypleasant--helpConfigurationpleasant-cliprompts the user for missing login information required for the Pleasant API.
This information can be configured (partially or completely) using command-line parameters
or environment variables:--api-urlorPYPLEASANT_API_URL--api-userorPYPLEASANT_API_USER--api-password(NOT RECOMMENDED) orPYPLEASANT_API_PASSWORDIn case self-signed certificates are used, consider disabling the HTTPS certificate check via--disable-cert-checkor by settingPYPLEASANT_DISABLE_CERT_CHECK=true.UsagePrint entry attributes:pleasant-cli/path/to/entry--username
pleasant-cli/path/to/entry--password
pleasant-cli/path/to/entry--urlAccess a custom field's value:pleasant-cli/path/to/entry--custom-fieldtestDownload attachments (defaults to the current directory):pleasant-cli/path/to/entry--attachments# downloads all attachmentspleasant-cli/path/to/entry--attachmentssecret_file.txt
pleasant-cli/path/to/entry--attachmentsfile_1.txtfile_2.txt--download-dir/path/to/download/dirFor a complete overview of all parameters, runpleasant-cliwith the--helpswitch:>pleasant-cli--help
usage:pleasant-client[-h](--username|--password|--url|--custom-field[CUSTOM_FIELD]|--attachments[ATTACHMENTS[ATTACHMENTS...]])[--download-dirDOWNLOAD_DIR][--api-urlAPI_URL][--api-userAPI_USER][--api-passwordAPI_PASSWORD][--disable-cert-check][--verbose][--debug]PATH|ENTRY-ID

positionalarguments:PATH|ENTRY-IDthepath(e.g./Development/git)orentry-id(e.g.36a9f39f-78a1-4ec5-ae1a-421d91f59d2a)onthepleasantservertothecredentialentry(envvar:PYPLEASANT_PATH_TO_ENTRY)optionalarguments:-h,--helpshowthishelpmessageandexit--usernameprinttheusername--passwordprintthepassword--urlprinttheURL--custom-field[CUSTOM_FIELD]printthegivencustomfield--attachments[ATTACHMENTS[ATTACHMENTS...]]downloadthegivenattachment(s);ifnoattachmentisgiven,allattachmentsaredownloaded--download-dirDOWNLOAD_DIRattachmentsaredownloadedtothisdirectory(DEFAULT:'.',envvar:PYPLEASANT_DOWNLOAD_DIR)--api-urlAPI_URLURLofthepleasantserverAPI(envvar:PYPLEASANT_API_URL)--api-userAPI_USERuserforthepleasantserverAPI(envvar:PYPLEASANT_API_USER)--api-passwordAPI_PASSWORDpasswordforthepleasantserverAPI(envvar:PYPLEASANT_API_PASSWORD)--disable-cert-checkdisableHTTPScertcheck(envvar:PYPLEASANT_DISABLE_CERT_CHECK)--verboseactivateverboseoutput--debugactivatedebugoutput(envvar:PYPLEASANT_DEBUG)