(still in development)
dead simple but flexible restful api framework,
~~ for modern back-end web development of your dreams
- what is rest ?
- how hacks do ?
each time you run hack generate -api resources, this is going to implement a full crud restful api for resources as well as search and pagination stuff! thanks to pony orm flexible Set syntax, you can easily add one-to-many(many-to-many) relationships and hacks will automatically generate relationship apis between resources!
hacks apps are capable of full-duplex realtime communication between the client
and the server using socketIO. this means that a client
can maintain a persistent connection to a hacks backend service, and messages
can be sent from client to server (AJAX) or from server to client (websocket) at any time.
- on server side, hacks integrate flask-socketIO
- and on front-end, hacks use jinja2 template that binding socketio service
- hacks automatically generate resources apis, but you can get complete control by editing apis configuration. you can decide which data user should post from or return as json format; you can also determine which api user can access and set up your own authentication policy!
- flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.
well, hacks is built on top of flask! so feel free to use any great flask extensions !
- hacks based on DRY idea. Since I do not want repeat myself, and try to sum up python web development procedure, so hacks appeared!
- not only that, hacks use the DRY idea for web development, hacks has several useful built-in decorators help you reduce duplication. yes, decorators is awesome!
## $ Get Start ### New a project
$ hack new demo
$ hack generate -api users
Currently, Hacks simply generate a prototype api, which means the api did not have:
- authentication mechanism
- relationship between each api resource,
- rate limit
- http caching
- user side config
- invoke your own code
and obviously, it not ready to go into production;
But, I will continue to feed more on Hacks, and finally let Hacks become a **production-oriented** but **deadly simple** restful api framework.
## $ Todo + [x] integrated the [pony orm](https://github.com/ponyorm/pony) + [x] find a database schema migration tool + well, [currently need to execute ALTER TABLE command manually.](ponyorm/pony#123) + [ ] refactory hacks project + [x] basic example + [x] apis + [x] apps + [x] add resources model mixin class + [ ] binding socketio + [ ] server-side socketio: flask-socketIO + [ ] client-side jinja2 template + [ ] build api resources relationship + [ ] configurations + [ ] restful api config + [ ] resource bp config + [ ] authentication policy + [ ] front-end workflow + [ ] add mongodb layer
## $ LICENSE MIT, check LICENSE file for detail