Skip to main content

Cafeto

Cafeto is a lightweight yet powerful framework designed as a top layer over Starlette, focusing on simplifying and accelerating the development of modern APIs. It harnesses the robust foundation of Starlette, offering additional tools for more efficient and organized development.

Requirements

This project requires Python 3.10 or a later version.

Installation

pip install cafeto

Project

Cafeto

Docs

Cafeto docs

Description

Cafeto is a framework designed to create APIs efficiently and in an organized manner, drawing inspiration from other frameworks while incorporating innovative ideas.

  • It offers a robust dependency injection system, supporting three lifecycle types: Singleton, Scoped, and Transient.
  • Facilitates the handling of incoming and outgoing data through DTOs (Data Transfer Objects), which also play a key role in validating and managing server interactions.
  • Includes an event system that extends the framework's capabilities, enabling greater customization and flexibility.
  • Integrates seamlessly with tools like OpenAPI and Swagger to provide interactive documentation and API testing.

With Cafeto, developers can build scalable and reliable APIs effortlessly, leveraging modern features and a well-structured approach.

Starlette

Starlette, the backbone of Cafeto, is widely recognized as one of the most outstanding frameworks for building asynchronous web applications in Python. Its minimalist design, coupled with exceptional performance, makes it ideal for developers seeking flexibility and power. Starlette not only provides routing, middleware, and WebSocket support but also integrates advanced tools for asynchronous task management and testing, establishing itself as a gold standard in modern web development.

Building on Starlette’s power, Cafeto takes the experience to the next level, delivering an even more streamlined and developer-friendly solution for API creation. Together, Cafeto and Starlette form the perfect duo for any developer seeking speed, simplicity, and technical excellence.

Main Objective

To create a smoother development experience for APIs, providing intuitive abstractions, smart default configurations, and compatibility with modern standards.

Example

from typing import Dict

from cafeto import App
from cafeto.mvc import BaseController
from cafeto.responses import Ok


app: App = App()

@app.controller('/home')
class HomeController(BaseController):
    @app.get('/hello')
    async def hello(self, name: str) -> Dict[str, str]:
        return Ok({'Hello': 'World!'})

app.map_controllers()

For more usage details, see the features

License

This project is licensed under the MIT License

Contact

Jonathan Espinal - jonathan.espinal@gmail.com

Documentation

Features

Next Steps

Metadata

Release files for cafeto 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cafeto 0.1.1
File Size Uploaded
cafeto-0.1.1.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for cafeto 0.1.1
File Interpreter ABI Platform
cafeto-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / cafeto-0.1.1.tar.gz

Download URL cafeto-0.1.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7edf026be2da739659e0a2c8b3e665d8467034f8d1a1fadcd2f3eed6583015da
BLAKE2b-256 checksum
How to use checksums
57e19afc27cc64793d2f855689326201d6211016baac28a819c98c45455cb9a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / cafeto-0.1.1-py3-none-any.whl

Download URL cafeto-0.1.1-py3-none-any.whl
Size 541.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0c0dbd212b2bfbed69752a226e6e69b8df7ac0e74b8411c99306a2d4d48953d
BLAKE2b-256 checksum
How to use checksums
c4e2ac66d198849cc65e67b86fb76e031cb8726cb3cfe0e54d393f54c0df1ed0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page