Payload Wtf 0.0.1 | Coderz Repository

payload-wtf 0.0.1

Last updated:

0 purchases

payload-wtf 0.0.1 Image
payload-wtf 0.0.1 Images

Free

Languages

Categories

Add to Cart

Description:

payloadwtf 0.0.1

Payload WTF
simple payload with an easy format for building Python APIs (like Django).
As an alternative that frees you to render responses without DRF or something
that is full of rules.
Quick Example
You can use this package is easy:
payload = PayloadWTF()
payload.set_state(setter=PayloadWTF.SET_RESULT, data={"data": "Yes this is data from queryset"})
payload.set_state(setter=PayloadWTF.SET_LINKS, next="http://.../?page=1")
payload.set_state(setter=PayloadWTF.SET_META, data={'user_activated': {'username': 'yanzen'}})
print(payload.tojson()) # Or payload.todata() result is dictionary

Result:
{
"results": {"data": "Yes this is data from queryset"},
"meta": {"user_activated": {"username": "yanzen"}},
"links": {"next": "http://.../?page=1", "prev": ""}
}

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.