This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

ReStruct is an easy light-weight formatting library that simplifies the process of representing SQL results in a human readable format (JSON). Pass the restruct method your SQL results and a formatting structure and voila, you have turned your complex SQL result into beautiful JSON. One of the best features of ReStruct is squashing all the duplicate entries from SQL joins into a sub section of your JSON structure.

Usage examples

Lets assume we have an SQL join for a 1 to 1 relationship and that all the format variables used represent columns in the select tables.

SELECT user_id,
       user_level,
       level_name,
       first_name,
       last_name,
       email
  FROM users
  JOIN user_levels USING (user_level_id)

Formatting

An example format structure for results from the above query:

{
    ".single": true,
    ".key": "{user_id}",
    "id": ": {user_id}",
    "level": {
        "id": ": {user_level}",
        "name": ": {user_level_name}"
    },
    "name": {
        "first": ":< first_name",
        "last": ":< last_name",
        "full": "{first_name} {last_name}"
    },
    "email": true
}
Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
restruct-0.1.1.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source May 6, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting