Prestans 3.0; The roadmap for our Python REST micro-framework
Prestans is a WSGI-compliant pure Python micro-framework aimed at aiding rapid development of robust RESTful APIs. It has a particular affinity for single-page web applications and native mobile clients. Back in 2012 we decided to focus our energy into building digital platforms; every one of them featuring an extensive API.
Prestans began as our internal effort at standardising the way we build APIs. We’d ended up building a micro-framework right on top of WSGI and were quickly convinced by others to publish it on PyPi. Prestans has evolved over the years; we published a complete rewrite of the framework in November, 2014 encapsulating everything we learnt about building quality web applications in Python.
Maintaining a building block is quite a responsibility. Prestans is great! It’s the backbone of our applications. We realise we have to make it better, giving other developers empirical evidence that Prestans is truly worth building applications upon.
We are announcing a ground up rewrite of our framework. Prestans 3.0!
Built from the ground up with good habits
Earlier this year we announced our commitment towards good habits. This foremost applies to Prestans.
Prestans will finally come to Python 3 (while maintaining support for Python 2.7). It will be accompanied with a complete set of unit tests and use of continuous integration during development. Properly configured console scripts, tested development and deployment under Virtualenv complimented with revised documentation.
Prestans features are a reflection of things our applications needed and we’ve been guilty of implementing only what we needed and releasing them into the wild. Here onwards we will introduce a formal enhancement proposal method. Every new feature will be debated, formalised and implemented in a backwards-compatible way.
Prestans 3.0 intends to be a first class citizen of the Python web application world.
Production versus development
Prestans, like many other frameworks, is accompanied by tools that assist in building applications using the framework. Arguably it does no harm in installing code intended for development in production environments. Our security ethos is “if it doesn’t belong it shouldn’t be installed”. We decided to embed this in our framework design process.
The next release forth Prestans will ship two editions:
- Server Edition containing the core framework and extensions
- Developer Edition containing all our developer tools
Both versions will be updated simultaneously and each Developer Edition will declare the corresponding Server Edition as its dependency.
Over the years terminology and where things reside have slipped a little. For example we realised that very little parsing code resides in the
prestans.parser package. Or that we could call classes like
ParameterSet something a little more descriptive. We intend to clean all of these things up and provide complimentary documentation to help you migrate to Prestans 3.0.
Since the early days Prestans has shipped with a feature we call Blueprint. It’s a self-discovery mechanism which makes the framework aware of everything your API provides. This includes end-points, what’s required in the requests, what the response looks like and everything you need to document your API.
Combine Blueprint with Python docstrings (PEP 0257) and Prestans 3.0 and you’ll be able to automatically generate documentation for your API. We intend to make this compatible with Sphinx, Jekyll and other popular documentation/static content management engines.
At Anomaly we are extremely committed to developing applications with solid foundations; Prestans being one of its key ingredients. We plan to document our entire development process allowing others to build on what we’ve learnt.
Prestans 3.0 aims to be a delightful, developer-friendly release, matured by our software development experience.
Follow the development on Github. Formal release announcements will be made on Twitter.