Guillotina. The Full Stack Data Framework

Love

Fast and scalable

Built on AsyncIO, Guillotina scales out of the box by design.

Simplicity with batteries included

With features like CORS, Websockets and TUS, Guillotina provides just the right amount of "batteries".

Securely organized data

Guillotina has a granular, hierarchical, multi-dimensional security system that allows you to manage the security of your content at a level not available to other frameworks.

Love Guillotina

Performance

Traditional Python web servers limit the number of simultaneous requests to the number of threads running the server. With AsyncIO, you are able to server many simultaneous requests at the same time.

Front-end friendly

Guillotina is designed to make your JavaScript engineers happy. With things like automatic Swagger documentation for endpoints, OOTB CORS and websockets, your front-end team will be happy to work with Guillotina. We speak JSON but can adapt with any Content-Type payload request/response bodies.

AsyncIO

With AsyncIO, websockets are simple. More interestingly, AsyncIO is an ideal match with micro-service architectures.

Object model

Guillotina uses a hierarchical object model. This hierarchy of objects then maps to URLs. The hierarchy model is perfect for managing a large number of objects.

Security

Guillotina has a granular, hierarchical, multi-dimensional security system that allows you to manage the security of your content at a level not available to other frameworks.

Scale

With integrations like Redis, ElasticSearch and CockroachDB, you have the tools to scale.

Key features

  • Transactional. All operations are managed to be durable and confirmed, conflict resolution policies

  • Content Tree. Think of your file explorer—all content is organized like a tree. The content tree maps directly to URLs("foo/bar" -> "http://localhost:8080/db/foo/bar")

  • Resources. Objects are resources with schema attributes, annotations, object oriented inheritance and static/dynamic behaviors

  • JSON schema/Python. Direct mapping of JSON schemas to python schemas and back again

  • Security. A robust ACL security system of permissions/roles/principals which cascade down nodes on the content tree

  • CRUD. All content on the tree works with CRUD operations as well as additional, dynamical endpoints for other operations on the content

  • AsyncIO. Based on AsyncIO so we don't block when using ElasticSearch, Redis, etc

  • CORS. Configurable CORS out of the box automatically on all endpoints

  • Websocket. Improve the performance of your frontend with websockets

  • TUS. Binary resumable file upload

  • Event. Event/subscriber based system to trigger operations in code

  • Registry. Container configuration registry

  • AsyncIO Queues and Pools. Optimize long-running tasks with built-in queue and pool

  • File Cloud. S3 and Google Cloud Storage file support

  • Search. Elasticsearch and Postgres search catalog

  • Cache. Redis cache and pubsub support

  • Swagger. Automatic API documentation generation

  • Containers. Docker / Kubernetes / Nomad support

  • MultiDB. PostgreSQL and CockroachDB support

Try Guillotina

  1. First install Guillotina with your terminal

     pip install guillotina
  2. Just type g (or guillotina) to run it

     g
  3. Your API explorer is ready!

     http://localhost:8080

    Or use the built-in admin dashboard

     http://localhost:8080/+admin

Take a look

Configure

Configure Guillotina with json or yaml

---
applications:
- guillotina_swagger
- guillotina_dbusers
- myapp
databases:
- db:
    storage: postgresql
    dsn: postgresql://guillotina@localhost:5432/guillotina
port: 8080
root_user:
  password: root

Create a service

@configure.service(
    context=ICustomType, name='@myEndpoint', method='GET',
    permission='guillotina.AccessContent')
async def my_endpoint(context, request):
    return {
        'key': 'value'
    }

Create a resource type

from guillotina import configure
from guillotina.content import Item
from guillotina.interfaces import IItem
from guillotina import schema


class ICustomType(IItem):
    foo = schema.Text()
 

@configure.contenttype(
    type_name="CustomType",
    schema=ICustomType,
    behaviors=[
        "guillotina.behaviors.dublincore.IDublinCore",
        "example.behaviors.ICustomBehavior",
    ])
class CustomType(Item):
    pass

Define security

configure.role("guillotina_chat.ConversationParticipant",
               "Conversation Participant",
               "Users that are part of a conversation", False)
configure.grant(
    permission="guillotina.ViewContent",
    role="guillotina_chat.ConversationParticipant")
configure.grant(
    permission="guillotina.AccessContent",
    role="guillotina_chat.ConversationParticipant")
configure.grant(
    permission="guillotina.AddContent",
    role="guillotina_chat.ConversationParticipant")