• Stars
    star
    870
  • Rank 50,528 (Top 2 %)
  • Language
    Rust
  • License
    Other
  • Created over 9 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A web application microframework for Rust

#Pencil

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

extern crate pencil;

use pencil::{Pencil, Request, Response, PencilResult};

fn hello(_: &mut Request) -> PencilResult {
    Ok(Response::from("Hello World!"))
}

fn main() {
    let mut app = Pencil::new("/web/hello");
    app.get("/", "hello", hello);
    app.run("127.0.0.1:5000");
}

One simple guide: https://fengsp.github.io/blog/2016/3/introducing-pencil/

If you feel anything wrong, feedbacks or pull requests are welcome.

More Repositories

1

plan

Crontab jobs management in Python
Python
1,166
star
2

color-thief-py

Grabs the dominant color or a representative color palette from an image. Uses Python and Pillow.
Python
978
star
3

django-grpc-framework

gRPC for Django.
Python
362
star
4

python-snippets

A basket of python snippets
220
star
5

sender

One easy to use Python SMTP client
Python
196
star
6

easy-python

Libraries you didn't know you would need
191
star
7

rc

Redis cache cluster system in Python
Python
121
star
8

knight

One HTTP development server with reloader for Go
Go
70
star
9

flask-snippets

Flask Snippets
Python
66
star
10

shortly

A URL shortener
Python
50
star
11

flask-profile

Flask Application Profiler
JavaScript
37
star
12

lookup

Look up words via the command line
Python
36
star
13

batpod

A really tiny web framework
Python
23
star
14

python

Python Style Guide
22
star
15

flask-application-wizard

Helper script to create Flask Applications
Python
16
star
16

cli

Rust command line utility
Rust
13
star
17

clock

A minimalist datetime library for Python
Python
10
star
18

pypages

Simple Python Pagination
Python
9
star
19

golang-tour

Sample Go code from the Tour of Go
4
star
20

slim

SimpleHTTPServer serving files relative to the current directory
Go
2
star
21

fengsp.github.io

Shipeng Feng's Writings
HTML
1
star
22

fork

Doing subprocess in Python should be easy
Python
1
star
23

faster-python

Write Faster Python Programs
Python
1
star
24

douban-photoalbum-downloader

Download douban photo album
Python
1
star
25

blog

My personal website
HTML
1
star
26

ninja

The ninja template engine for Go
Go
1
star
27

markdown-online

Put your local markdowns online
JavaScript
1
star
28

pyalgorithms

Algorithms in Python
Python
1
star