Fast and scalable
Built on AsyncIO, Guillotina scales out of the box by design.
Built on AsyncIO, Guillotina scales out of the box by design.
With features like CORS, Websockets and TUS, Guillotina provides just the right amount of "batteries".
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.
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.
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.
With AsyncIO, websockets are simple. More interestingly, AsyncIO is an ideal match with micro-service architectures.
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.
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.
With integrations like Redis, ElasticSearch and CockroachDB, you have the tools to scale.
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
First install Guillotina with your terminal
pip install guillotina
Just type g (or guillotina) to run it
g
Your API explorer is ready!
http://localhost:8080
Or use the built-in admin dashboard
http://localhost:8080/+admin
Take a look
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
@configure.service(
context=ICustomType, name='@myEndpoint', method='GET',
permission='guillotina.AccessContent')
async def my_endpoint(context, request):
return {
'key': 'value'
}
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
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")