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

Tableau is a collection of helper classes for building test fixtures and seed data.

  • Model composition without any predefined schemas. The model object relationships are automatically deduced through the value annotations:

    from tableau import Datum
    
    foo = Datum(
      'Foo', ('id'), # schema name / identifiers
      id=1,
      field_a=1,
      field_b=2,
      collection=one_to_many([
        Datum(
          'Bar', auto('id'), # id will be automagically generated by the walker
          field_c=1
          ),
        Datum(
          'Bar', auto('id'),
          field_c=1
          ),
        ],
        referring_fields='foo_id'
        )
      )
    
  • Export the model object graph to plain ANSI SQL statements, in the ORM-agnostic manner:

    import sys
    from tableau import Datum, DataSuite, DataWalker
    from tableau.sql import SQLGenerator
    
    # ...
    
    suite = DataSuite()
    DataWalker(suite)(foo)
    SQLGenerator(sys.stdout, encoding='utf-8')(suite)
    

    The above yields the following SQL statements:

    INSERT INTO `Foo` (`id`, `field_a`, `field_b`) VALUES
    (1, 1, 2);
    INSERT INTO `Bar` (`id`, `field_c`, `foo_id`) VALUES
    (1, 1, 1),
    (2, 1, 1);
    
  • Automatically mapping the existing SQLAlchemy tables / declarative classes to the Data:

    from tableau.sqla import newSADatum
    
    # metadata = ...
    # Base = ...
    # session = ...
    
    class Foo(Base):
      __tablename__ = 'foos'
      id = Column(Integer, primary_key=True)
      field = Column(String)
    
      def some_model_specific_method(self):
        return self.field
    
    Datum = newSADatum(metadata, Base)
    datum = Datum(
      'foos', ('id'),
      field='test'
      )
    print datum.some_model_specific_method() # 'test'
    session.add(datum) # it can even be added to the session!
    

Change history

0.0.0
Unreleased.
0.0.1
First release. No docs!
0.0.2
Support mapping to SQLAlchemy tables and declarative classses. Still no docs!
0.0.3
Fix critical bugs in 0.0.2.
Release History

Release History

0.0.3

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.0.2

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.0.1

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
tableau-0.0.3.tar.gz (11.2 kB) Copy SHA256 Checksum SHA256 Source Jul 8, 2012

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