In your example you provide the following sample:
from stathat import StatHat
stathat.ez_post_value('some@email', 'sign in - age of user', 27.0)
If followed faithfully, this example fails for two reasons:
StatHat class is capitalized, and module not imported -- the second line doesn't resolve symbol properly
- If I assume I ought to have capitalized the class in 2nd line (that's what I imported), I'd find that non-instance class members should be decorated with
@classmethod or @staticmethod in python -- calling ex_post_value on the class directly rather than an instance of the class will fail
I'd recommend wrapping these in a class that you can initialize with an API key so you don't have to pass the API key to every method call, and amending the instructions to instantiate the class. Or you could use static/class methods, or skip the class entirely.
Additionally, I noticed you provide a ruby gem. It's easy to do similar packaging with pypi for python: https://packaging.python.org/en/latest/distributing/#uploading-your-project-to-pypi
In your example you provide the following sample:
If followed faithfully, this example fails for two reasons:
StatHatclass is capitalized, and module not imported -- the second line doesn't resolve symbol properly@classmethodor@staticmethodin python -- callingex_post_valueon the class directly rather than an instance of the class will failI'd recommend wrapping these in a class that you can initialize with an API key so you don't have to pass the API key to every method call, and amending the instructions to instantiate the class. Or you could use static/class methods, or skip the class entirely.
Additionally, I noticed you provide a ruby gem. It's easy to do similar packaging with pypi for python: https://packaging.python.org/en/latest/distributing/#uploading-your-project-to-pypi