0
I Use This!
Activity Not Available
Analyzed about 1 year ago. based on code collected about 1 year ago.

Project Summary

THIS PROJECT HAS MOVEDhttp://github.com/g2p/tranquil

DescriptionThis is a small project that attempts to seamlessly integrate SQLAlchemy into the Django web framework.

It does this not by attempting to actually replace Django's ORM, but by implementing a Django application that automatically reflects the database and builds the SQLAlchemy ORM objects.

FeaturesAutomagically creates SQLAlchemy ORM objects Introspects Django models to include backreferences Able to provide custom SQLAlchemy table, object, and mapper objects. Can use Django models as objects for the SQLAlchemy ORM DocumentationRequirements Installation BasicUsage AdvancedUsage ExampleModels ExampleViews ExampleAlchemy MotivationSimple. Try getting a query like this out of Django:

SELECT root_source_1.id AS root_source_1_id,
root_source_1.name AS root_source_1_name,
root_source_1.description AS root_source_1_description,
root_source_1.identifier_id AS root_source_1_identifier_id,
root_featuretype_2.id AS root_featuretype_2_id,
root_featuretype_2.name AS root_featuretype_2_name,
root_featuretype_2.display AS root_featuretype_2_display,
root_feature.id AS root_feature_id,
root_feature.source_id AS root_feature_source_id,
root_feature.type_id AS root_feature_type_id,
root_feature.location AS root_feature_location,
root_propertytype_3.id AS root_propertytype_3_id,
root_propertytype_3.name AS root_propertytype_3_name,
root_propertytype_3.display AS root_propertytype_3_display,
root_property_4.id AS root_property_4_id,
root_property_4.feature_id AS root_property_4_feature_id,
root_property_4.type_id AS root_property_4_type_id,
root_property_4.value AS root_property_4_value,
root_property_4.idxfti AS root_property_4_idxfti
FROM (
SELECT DISTINCT
root_feature.id AS root_feature_id,
root_feature.id AS root_feature_oid
FROM root_feature
LEFT OUTER JOIN
root_property ON root_property.feature_id = root_feature.id
LEFT OUTER JOIN
root_propertytype ON root_property.type_id = root_propertytype.id
LEFT OUTER JOIN
root_location ON root_location.feature_id = root_feature.id
LEFT OUTER JOIN
root_modifier ON root_location.start_mod_id = root_modifier.id
LEFT OUTER JOIN
root_location AS root_location_5 ON root_location_5.feature_id = root_feature.id
LEFT OUTER JOIN
root_modifier AS root_modifier_6 ON root_location_5.end_mod_id = root_modifier_6.id
WHERE root_feature.source_id = %(root_feature_source_id)s
AND (
root_location.start + %(root_modifier_multiplier)s * root_modifier_6.multiplier =
%(literal_1)s
OR root_location.start + %(root_modifier_multiplier_2)s * root_modifier_6.multiplier >=
%(literal_2)s
AND root_location.start + %(root_modifier_multiplier_3)s * root_modifier_6.multiplier =
%(literal_4)s
AND root_location."end" + %(root_modifier_multiplier_5)s * root_modifier_6.multiplier <=
%(literal_5)s
)
ORDER BY
root_feature.id
) AS tbl_row_count,
root_feature
LEFT OUTER JOIN
root_source AS root_source_1 ON root_feature.source_id = root_source_1.id
LEFT OUTER JOIN
root_featuretype AS root_featuretype_2 ON root_feature.type_id = root_featuretype_2.id
LEFT OUTER JOIN
root_property AS root_property_4 ON root_property_4.feature_id = root_feature.id
LEFT OUTER JOIN
root_propertytype AS root_propertytype_3 ON root_property_4.type_id = root_propertytype_3.id
WHERE root_feature.id = tbl_row_count.root_feature_id
ORDER BY
root_feature.id,
root_source_1.id,
root_featuretype_2.id,
root_property_4.id,
root_propertytype_3.id

Tags

django introspection orm python sqlalchemy

In a Nutshell, tranquil...

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    check out hot projects on the Open Hub
  • ...
    in 2016, 47% of companies did not have formal process in place to track OS code
  • ...
    compare projects before you chose one to use

30 Day Summary

Apr 9 2016 — May 9 2016

12 Month Summary

May 9 2015 — May 9 2016

Ratings

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!