Metadata-Version: 2.0
Name: pyramid-georest
Version: 3.0.2rc1
Summary: pyramid_georest, extension for pyramid web frame work to provide rest interface for sql-alchemy mappers
Home-page: https://github.com/vvmruder/pyramid_georest
Author: Clemens Rudert
Author-email: clemens.rudert@bl.ch
License: GNU General Public License
Keywords: web pyramid pylons rest sqlalchemy orm model geoalchemy
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 2.7
Classifier: Framework :: Pyramid
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Requires-Dist: pyramid
Requires-Dist: SQLAlchemy
Requires-Dist: shapely
Requires-Dist: dicttoxml
Requires-Dist: geoalchemy2
Requires-Dist: transaction
Requires-Dist: waitress
Requires-Dist: pyramid-debugtoolbar
Requires-Dist: zope.sqlalchemy
Requires-Dist: PyYAML
Requires-Dist: psycopg2
Requires-Dist: simplejson
Provides-Extra: testing
Requires-Dist: WebTest (>=1.3.1); extra == 'testing'
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: pytest-cov; extra == 'testing'

Pyramid REST interface
======================

This little package gives shortcuts to create a restful api to database sources. It provides a url pattern to serve the
sources.
It is meant to be used in a pyramid web framework eco system. It uses pyramid and sqlalchemy logic as well. Its goal is
to extend the database usage in pyramid frameworks. This way, it will be possible to serve data sources from
different databases from a single pyramid application.
I used a simple class system to make this api as adaptable as possible.

Main features:

* read (json, geojson, xml) + filtering via json parameters - also for geographic attributes
* read one / show (json, geojson, xml)
* create one
* update one
* delete one
* data model description (json, geojson, xml) => This provides a description to implement client side forms bound to the underlying data.

Special thing of this api: It can serve geometric extension objects too (It's only limited by geoalchemy2).

Dependencies:
=============
* pyramid (tested with 1.7.3)
* SQLAlchemy (tested with 1.0.15)
* GeoAlchemy2 (tested with 0.3.0)
* Shapely (tested with 1.5.17)
* dicttoxml (tested with 1.7.4)
* simplejson (tested with 3.8.2)


Usage in a standard pyramid web app
-----------------------------------

The pyramid framework for web apps provides an easy way for including standalone packages in its eco system. To learn
more about that, please refer to the http://docs.pylonsproject.org/projects/pyramid//en/latest/narr/extending.html.

In a nutshell (inside the __init__.py of your pyramids project in the main method ):

Configure the services which you want to be served via this api. Look at the following example to see how: 

```python
   from pyramid_georest.lib.rest import Api, Service
   from application.model import TestModel
   def main(global_config, **settings):
      """ This function returns a Pyramid WSGI application."""
      config = Configurator(settings=settings)
      config.include('pyramid_georest', route_prefix='api')
      test_api = Api(
         'postgresql://postgres:password@localhost:5432/test',
         config,
         'test_api'
      )
      test_service = Service(TestModel)
      test_api.add_service(test_service)
      config.scan()
      return config.make_wsgi_app()
```

Calling the config.include method with the packages name will do some initializing stuff (Note that the optional
parameter 'route_prefix' can be used to set the restful interface below a fix name space. This may be helpful especially
in big applications).


Pyramid REST Changelog
======================

## 3.0.2

* fix the add_view problem when rest api is included in other 
applications.

## 3.0.1

* fix the issue with geometric filtering
* make all geometric filter methods overwritable

## 3.0.0

* redesign complete behaviour (straight classes for more flexibility)
* redesign url creation
* complete independent api creation

## 2.0.4

Fixed issues:

* improve session handling
* use zope extension for sessions
* catch broad band errors to handle unknown behavior on db connections

## 2.0.3

Fixed issues:

* [#2](https://github.com/vvmruder/pyramid_georest/issues/2): Fixed problem where the relationship properties wasn't 
loaded correctly .

## 2.0.2

Fixed issues:

* [#2](https://github.com/vvmruder/pyramid_georest/issues/2): Fixed lost m to n handling.

## 2.0.1

Fixed issues:

* [#1](https://github.com/vvmruder/pyramid_georest/pull/1): Fixed encoding issue in filter parameter.

## 2.0.0

First usable version of this package (propably not pip save).

This version ships with the basic parts of REST and some updates which mainly belong to the sqlalchemy
session handling and the filtering system.


