The task manager for python
Project description
Provides a presentation and transformation layer for complex data output, the like found in RESTful APIs, and works really well with JSON. Think of this as a view layer for your JSON/YAML/etc. Based on https://fractal.thephpleague.com/
Documentation
Usage
Install:
$ pip install fractal_output
from fractal_output import Manager, Transformer, Item
class UserTransformer(Transformer):
def transform(self, user):
return {
'id': user.id,
'firstName': user.first_name
}
user = YourUserClass()
transformer = UserTransformer()
item = Item(user, transformer)
manager = Manager()
manager.create_data(item).to_json()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fractal_output-1.0.1.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file fractal_output-1.0.1.tar.gz
.
File metadata
- Download URL: fractal_output-1.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9f4dd3b47230e176753b960744b60281cf10e0c421a570fdaa741d0155285a1 |
|
MD5 | a330a2a21461b269ff03684dcf4f1fd6 |
|
BLAKE2b-256 | 29918dd5ea3ef36bae74cf90f1caf6ec9cebdb39a3ba67fabd492758db6a27b2 |
File details
Details for the file fractal_output-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: fractal_output-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79539c902672a1a64c0a51e9e88cb1a9488ff2e69a72a2726ad8b09a3704171c |
|
MD5 | 8f178ba509b91f38fc7da9a84df06ebf |
|
BLAKE2b-256 | bafe2b26418ebd1441500dcccea5ee2eef826dd6523ded27aedbee418b4854c9 |