Padrino is a Ruby web framework built upon the Sinatra web library.

We created Padrino to make it fun and easy to build more advanced web applications, while staying true to the spirit that makes Sinatra great.

Padrino 0.16.0 · December 2025

Ruby 2.7.8+ · Sinatra 4 · MIT licensed

app/controllers/posts.rb
Blog::App.controllers :posts do
  get :index do
    @posts = Post.order(created_at: :desc)
    render 'posts/index'
  end

  get :show, with: :id, provides: [:html, :json] do
    @post = Post.find(params[:id])
    case content_type
    when :json then @post.to_json
    else render 'posts/show'
    end
  end
end

Why Padrino

Many people love the simplicity and expressiveness of Sinatra, but quickly find themselves missing much of what frameworks such as Rails provide once their applications grow.

Sinatra is a thin layer on top of Rack that adds complexity only when an application needs it. We expand on it with the helpers, generators and other standard libraries a framework needs for apps of any size, from a lightweight JSON service to a large full-stack site.

Our goal with Padrino is to stay true to the core principles of Sinatra, including a focus on simplicity and modularity.

Tiny and fast. Clean and compact. Creative and concise.

Agnostic

Use the libraries you already know

Padrino is ORM, JavaScript, testing, rendering and mocking agnostic. Pick the libraries you already know, or none at all, and the generator creates a clean and compact directory structure that keeps your code simple and well organized. Try it here and copy the command.

See all components
padrino g project blog --orm sequel --adapter sqlite --renderer slim --test rspec

Routing

Give every URL a name

Define your URLs in one place and refer to them by name everywhere else. Padrino adds named routes and params, format negotiation and before and after filters to Sinatra's routing.

Read about routing
app/controllers/admin.rb
Blog::App.controllers :admin do
  before { halt 403 unless session[:account_id] }

  get :show, with: :id do
    # "/admin/show/42"
  end
end

url_for(:admin, :show, id: 42)
# => "/admin/show/42"

Drop-in admin

An admin interface, built in

Padrino ships with an admin interface, akin to Django's, that includes account authentication and permission management. Create an admin page for any model with one command. It works with ActiveRecord, Sequel, Mongoid and more, and is translated into ten languages.

Explore the admin
Terminal
$ padrino g admin
$ padrino rake db:migrate
$ padrino rake db:seed
$ padrino g admin_page post
$ padrino start
# => http://localhost:3000/admin

Mountable

Designed for mounting multiple apps

Unlike other Ruby frameworks, Padrino is designed from the start for mounting multiple apps. When your site gets big, split it into small apps and route them by path, host or subdomain.

Mount applications
config/apps.rb
Padrino.mount('Blog::App').to('/blog')
Padrino.mount('Shop::App').host('shop.example.org')
Padrino.mount('Admin').to('/admin')
Padrino.mount('Web::App').to('/')

Sinatra core

Or bring just the parts you need

Already have a Sinatra app? We built every Padrino component to work on its own, so you can add the helpers, mailer or caching to it without changing anything else.

Standalone usage
app.rb
require 'sinatra/base'
require 'padrino-helpers'
require 'padrino-mailer'

class Application < Sinatra::Base
  register Padrino::Helpers
  register Padrino::Mailer
end

Start building with Padrino

Follow the guides from your first project to a full application.

Type to search the guides.