Skip to main content

tg2ext.express, a small extension for TurboGears2

Project description

A small extension for TurboGears2

For example

from tg2ext.express import ExpressController

class ExampleModel(DeclarativeBase):

__tablename__ = ‘examples’

#{ Columns id = Column(Integer, primary_key=True) data = Column(Unicode(256), nullable=False) created = Column(DateTime, default=func.NOW()) #}

class RootController(BaseController):

# … examples = ExpressController(model=ExampleModel, dbsession=DBSession)

# …

Exposed HTTP Interface:

/examples/ /examples/1 /examples/?id__in=1,2,3 /examples/?__include_fields=id,created&__begin=3&__limit=10 …

HTTP API:

Controle Params:

__begin: __limit: __include_fields: __extend_fields:

Query Lookups: ${field_name}__${lookup}=${value(s)}

not contains startswith endswith in range lt lte gt gte year month day hour minute dow

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

tg2ext.express-0.2.5.tar.gz (11.8 kB view hashes)

Uploaded Source

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