-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
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:
StatHatclass 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
@classmethodor@staticmethodin python -- callingex_post_valueon 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels