Skip to main content

The task manager for python

Project description

Build Status Version Pyversions

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


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)

Uploaded Source

Built Distribution

fractal_output-1.0.1-py2.py3-none-any.whl (3.8 kB view details)

Uploaded Python 2 Python 3

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

Hashes for fractal_output-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f9f4dd3b47230e176753b960744b60281cf10e0c421a570fdaa741d0155285a1
MD5 a330a2a21461b269ff03684dcf4f1fd6
BLAKE2b-256 29918dd5ea3ef36bae74cf90f1caf6ec9cebdb39a3ba67fabd492758db6a27b2

See more details on using hashes here.

File details

Details for the file fractal_output-1.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fractal_output-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 79539c902672a1a64c0a51e9e88cb1a9488ff2e69a72a2726ad8b09a3704171c
MD5 8f178ba509b91f38fc7da9a84df06ebf
BLAKE2b-256 bafe2b26418ebd1441500dcccea5ee2eef826dd6523ded27aedbee418b4854c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page