Questions tagged [flask-potion]

Flask-Potion is a RESTful API framework for Flask and various Python ORMs

5 questions
2
votes
1 answer

Swagger UI for flask-potion based app

Is there a way to create Swagger-API UI documentation for a flask-potion based application? I've tried using "flasgger", but it doesn't work for routes that are written with potion-type routes. Flask-potion has a route specified in following manner-…
1
vote
1 answer

Flask-Potion + Flask-Principal Locking down User Resource

I am following the Flask-potion tutorial and trying to secure my api. I am stuck on trying to figure out how to set permissions on the User endpoint so that a User cannot look at another User's record. Here is my code: class…
tauren.kristich
  • 449
  • 1
  • 6
  • 22
0
votes
1 answer

Inline/Eager loading of collection on Potion

Is there a way to have Potion return an inline collection of json objects, instead of returing JSON Hyperschema references? E.g. my current code is returning this: { "$uri": "/worker/1", "mobile_number": null, "name": "Ben", "password":…
DaBeeeenster
  • 1,481
  • 3
  • 16
  • 20
0
votes
1 answer

Testing 409 conflict in flask-potion

I'm trying to test that a ModelResource of flask potion conflicts on creation if a one with the same id is present: class Device(db.Model): __tablename__ = 'device' uuid = db.Column(UUID, primary_key=True, default=lambda: str(uuid4())) …
shipperizer
  • 1,641
  • 1
  • 13
  • 19
0
votes
1 answer

JSON Hyper-Schema: Correct way to extract instance IDs for application URLs

Using JSON Hyper-Schema via Flask-Potion, I have an API that returns a list of species found at /api/species. It returns something like this: [ { "$uri": "/api/species/1", "latin_name": "danio rerio", "name": "zebrafish" } ] For my web…
Brandon
  • 668
  • 8
  • 22