development repo for PyhtonOnWheels framework
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pythononwheels
.gitignore
Licence.txt
README.md
README.rst
setup.py

README.md

Pow logo

PythonOnWheels reStructured and reImplemented.

I call it SQUEEZY => for Simple, Quick and Easy.

Principle

Designed for simplicity, happiness and Quick results!

As simple to use as possible. Everything you always need on board. Batteries included! (tornado Webserver, SQLite DB, NoSQL DBs: tinyDB, MongoDB, MongoDB Atlas Service) Non intrusive! You can always escape and go RAW.

Newly implemented:

  • MongoDB support (Transactions usable with Mongo >4)
  • MongoDB Atlas support for even quicker start in the cloud
  • Observer for Models (Like ActiveRedcord. Just add a class Named: ModelNameObserver. Will be found and used by convention)
  • Added Dirty Model support (like ActiveRecord). Track changes, Show, rollback.

Strong Foundation:

  • python 3.x
  • tornado webserver
  • sqlalchemy ORM
  • cerberus schemas and validation on board
  • tornado templates
  • tinyDB and ElasticSearch on board... more to come

Super easy, quick to start and all the basics on board:

  • super easy relations with decorators @relations.has_many("comments")
  • super easy REST routing with decorators @app.add_restful_routes(),
  • routing decorator @app.add_route(route)
  • db migrations autogenerated using alembic in the back
  • validation on board with cerberus schemas
  • use the same schema descrition for all model types (sql, nosql, elastic..)
  • generate_models script
  • generate_migrations script
  • update_db script
  • generate_handlers
  • generate_app
  • automatic scaffolding views (work in progress)

Code examples

Routes:

# this will call the myget method on HTTP GET calls and will hand over the re-group as the 1st parameter.
@app.add_route("/index/([0-9]+)*", dispatch={"get" : "myget"})
class IndexdHandler(BaseHandler):
    def myget(self, index=None):
        print("  index:" + str(index))
        self.render("index.tmpl")

Relations: (SQL Models)

@relation.has_many("comments")
class Post(Base):
    # a blog Post
    schema = {
        'text': {'type': 'string'},
        'name': {'type': 'string', 'maxlength' : 35},
        'last': {'type': 'number'}
    }

Check: The PythonOnWheels Homepage