ulif / diceware

Passphrases to remember
GNU General Public License v3.0
359 stars 45 forks source link

document usage for import to other python applications #11

Closed dreftymac closed 8 years ago

dreftymac commented 9 years ago

Currently there is no documentation for using this package as an import to other python applications, the documentation covers command-line use only.

ulif commented 9 years ago

Thank you for the hint and of course you're right. Do you have a certain usecase in mind?

For now please stick with the source and tests. But the next release should provide proper API docs as well.

dreftymac commented 9 years ago

// Do you have a certain usecase in mind? //

I use diceware n-grams for a lot more than just passwords. They are very useful in many circumstances because of their high-entropy and ease of memory by humans.

ulif commented 9 years ago

Just added some (auto-generated) API docs, visible at

http://diceware.readthedocs.org/en/latest/api.html

I hope it helps but if it does not: please tell what you need or could be described better (except from code examples; I am aware that we had use for more of them).

dreftymac commented 8 years ago

Another example use for diceware system (diceware 3-grams): http://what3words.com/about/

ulif commented 8 years ago

@dreftymac: I see the n-gram usecase. I am not sure, however, what exactly you are looking for.

With the current CLI you can do 3-grams like this:

$ diceware  -n 3 -d '-'
Cub-Wick-Hefty

API-wise you could do (for instance):

>>> import diceware
>>> opts = diceware.handle_options(args=["-n", "3", "-d", "-"])
>>> diceware.get_passphrase(opts)
'Comply-Heart-Remark'

What other kind of interface do you have in mind? I see, that it should be possible to pass options in a more natural way (and not like working over the commandline).

Please tell, what you have in mind and I will see what can be done about it.

dreftymac commented 8 years ago

//What other kind of interface do you have in mind? I see, that it should be possible to pass options in a more natural way (and not like working over the commandline).//

Right now the thought is to use as a plug-in to IDE and text editor, as well as general-purpose plugin for other uses, where high-entropy easy-to-remember keywords are needed.

There is already a ruby-based component that is being used for this purpose, but it would be favorable to switch to python, and also to avoid re-inventing the work you have done here.

It looks like the command-line interface and API interface will be adequate, it has been a while since I have evaluated this module.

I will go ahead and close this issue, since the documentation has been updated.

Thanks for your feedback and implementation, if you have any need for contributors or help on your projects, I will be happy to chip-in for gratitude for what you have done here.