hyp
hyp copied to clipboard
What version of marshmallow tutorial releates to?
I am trying to learn Python, I want to make a simple JSON API backend for private project "PassMan" (yeah, a password manager) In my virtualenv I have:
(env) C:\workspace\pyczarm>pip list
click (6.6)
Flask (0.11.1)
hyp (1.0.0)
inflection (0.3.1)
itsdangerous (0.24)
Jinja2 (2.8)
MarkupSafe (0.23)
marshmallow (2.10.1)
pip (7.1.0)
pymongo (3.3.0)
schematics (1.1.1)
setuptools (18.1)
six (1.10.0)
Werkzeug (0.11.11)
Running this code:
from marshmallow import Schema, fields
from hyp.responder import Responder
class PasswordSchema(Schema):
_id = fields.String()
portal = fields.String()
login = fields.String()
password = fields.String()
note = fields.String()
class PasswordResponder(Responder):
TYPE = 'passwords'
SERIALIZER = PasswordSchema
Gives me error:
Traceback (most recent call last):
File "C:/workspace/pyczarm/passman.py", line 2, in <module>
import models.Password
File "C:\workspace\pyczarm\models\Password.py", line 3, in <module>
from hyp.responder import Responder
File "C:\workspace\pyczarm\env\lib\site-packages\hyp\responder.py", line 5, in <module>
from hyp.adapters.base import adapter_for
File "C:\workspace\pyczarm\env\lib\site-packages\hyp\adapters\base.py", line 4, in <module>
from marshmallow import Serializer as MarshmallowSerializer
ImportError: cannot import name 'Serializer'
Could You please make appropriate updates?
installing this package by pip install
installs some version with other source code and not compatible with marshmallow 0.5.2, I switched to marshmallow 1.0.0 by trial and error and now it works. How should I install package from github if pip install
get some older one?
@gitowiec I'm sorry to break it to you, but this library haven't been updated to follow the latest JSON-API spec. If you're up for it I would love a pull request to bring it up to speed with the latest spec and latest marshmallow release. I'm no longer using this library in production have have had a hard time giving this library the ❤️ that it requires.