Turboengine
===========
Google app engine utilities using some django's ideas.
Install
-------
:
git clone git://github.com/carlitux/turboengine.git
cd turboengine
python setup.py Install
Usage
-----
Create an setting.py file and can add variables settings as you want, but
this is some commons variables::
TEMPLATE_PATH = 'templates'
# setting DEBUG
DEBUG = True
SITE_TITLE = 'turboengine for GAE'
# mapping (parent url, appname)
INSTALLED_APPS = [(parent_url, appnane)] # app names shouldn't be standard python libraries and they should be importables into PYTHONPATH
TEMPLATE_TAGS_PATHS = [] # not used but it will be used in feature for loading templatetags
ERROR_PAGE_PATH = '/error/' # path where will be redirected the error
LOGIN_PATH_REDIRECT = '/' # path where redirect after login or logout
PROFILE_PATH = '/account/profile/'
To import settings do this:
from turboengine.conf import settings
If you want to implement an Website use this:
from turboengine.http import RequestHandler
from turboengine.decorators import login_required
class MyHandler(RequestHandler):
def get(self):
# you can add headers or common usages of the request
user = self.user # return authenticated user or None if is not logged in
.... code
self.render_template(template, paramaters)
@login_required
def post(self):
.... code
And use one file like (app.py)::
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from turboengine import urls
from turboengine.conf import settings
application = webapp.WSGIApplication(urls.generate_urls(settings.INSTALLED_APPS), debug=settings.DEBUG)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
If you want to implement webservices first install ZSI and zope.interface then::
from turboengine.webservices.application import SOAPAplication
from turboengine.webservices.application import WSGIAplication
from EchoServer_server import * # this class is generated by 'python wsdl2py SimpleEcho.wsdl' see http://carlitos-kyo.blogspot.com/2009/12/web-services-python-google-app-engine.html
# Implementing services
class wsEchoServer(EchoServer):
# Make WSDL available for HTTP GET
wsdl = "".join(open('SimpleEcho.wsdl').readlines())
disco = "".join(open('SimpleEcho.disco').readlines())
def soap_Echo(self, ps, **kw):
request, response = EchoServer.soap_Echo(self, ps, **kw)
return request, request
def main():
application = WSGIApplication()
application['EchoServer.asmx'] = SOAPAplication(wsEchoServer())
#application['OtherServer.asmx'] = SOAPAplication(wsOtherServer()) # could have many webservices
run_wsgi_app(application)
if __name__ == '__main__':
main()
Please to see how to use webservices on GAE visit this:
http://carlitos-kyo.blogspot.com/2009/12/web-services-python-google-app-engine.html
TODO
----
Implement restful and templatetags
Metadata
Release files for turboengine 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| turboengine-1.0.2.tar.gz | 6.6 kB | Without provenance | Details for turboengine-1.0.2.tar.gz |
Release files / turboengine-1.0.2.tar.gz
| Download URL | turboengine-1.0.2.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfabd903c8f45b3726f236b4edee3f556348a0daf6211eb35af3fb6319463b0d
|
|
BLAKE2b-256 checksum How to use checksums |
c3112ee766d546417c3364bfd373b63519f8a6040062c90558d74645df2736b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for turboengine 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.