wordnik / wordnik-python

Wordnik Python public library
227 stars 47 forks source link

Broken packaging (IMHO) #11

Closed gthomas closed 12 years ago

gthomas commented 12 years ago

This is crazy!

Put the full path to the directory containing the wordnik directory here

sys.path.append('/parent/path')

Isn't there a way to package your API such that this is not required?

mrjf commented 12 years ago

You're totally right of course, there certainly is a better way to do that. We will soon be releasing a version that has proper packaging.

The reason the current library has some little oddities is due to how it is generated. We created it using our Swagger code generation library, which generates clients automatically based on a set of templates for a given language, and a resource declaration from the API server. Swagger is utterly fantastic, but earlier versions were oriented more towards Java-like languages, and so the Python templates weren't able to create the structures that would be more normal for a Python package.

The good news is that Swagger has subsequently gained lots of flexibility, and we will be redoing the Python templates soon. You'll be able to simply import the library as usual.

Thanks for checking out the client and for getting in touch. Always let us know if you have any questions or comments.

gthomas commented 12 years ago

I see. I removed wordnik/api/VersionChecker.py from my fork and it works like a charm. This is probably because VersionChecker.py is a PHP file.

Thanks for the quick response!

mrjf commented 12 years ago

Ugh, thanks, we'll fix that too.

gthomas commented 12 years ago

I opened a pull request on swagger-codegen that ought to fix this issue.

mrjf commented 12 years ago

Thanks Grant, will pull soon, and make sure this gets incorporated into new templates. Much obliged!

On May 8, 2012, at 3:21 PM, "Grant Thomas" reply@reply.github.com wrote:

I opened a pull request on swagger-codegen that ought to fix this issue.


Reply to this email directly or view it on GitHub: https://github.com/wordnik/wordnik-python/issues/11#issuecomment-5588199