Too Long; Didn't Read
A simple encrypt(plain_text, password) function uses the password to encrypt the plain text. The same person who is encrypting the data is typically decrypting it as well (think password manager) The library supplies us with a secure nonce. Scrypt is used to generate a secure private key from the password. A new random salt is used for each run of our encryption. This makes it impossible for an attacker to use precomputed hashes in an attempt to crack the cipher. A random nonce must be a random and unique value for each time our encryption function is used.