vaibhavsingh97 / random-word

This is a simple python package to generate random english words
https://pypi.org/project/random-word/
MIT License
123 stars 25 forks source link

Allow direct importing/use of package #23

Closed ErikBoesen closed 3 years ago

ErikBoesen commented 5 years ago

Is your feature request related to a problem? Please describe. I don't quite see why it should be necessary to instantiate this package.

Describe the solution you'd like Revision of code so that one can simply do:

import random_word
random_word.get_random_word(...)

Describe alternatives you've considered N/A

Additional context Again, if you're okay with it I can implement this myself.

vaibhavsingh97 commented 5 years ago

Hi @ErikBoesen Yes, we can do so, but will you pass API as a parameter every time? As currently, while initiating the package, API key is initialized and available to all the methods to call as API. Please let me know your thoughts on this, how we can improve?

ErikBoesen commented 5 years ago

I see now from a closer look that you do instantiate the API each time. But my concern is that there's not really any variation in how you do this, so you might as well instantiate it automatically since there's no API key being passed.

Also I as a user would prefer to not have many different names. Right now it uses random-word, random_word, and RandomWords. I would standardize around random_word and RandomWord if I were you.

ErikBoesen commented 5 years ago

I'll make a PR in a bit.

vaibhavsingh97 commented 5 years ago

@ErikBoesen Any update?

vaibhavsingh97 commented 3 years ago

Closing this issue, as in new update user will have the option to pass API of their own