Skip to main content
cup: a pythonic wrapper around web.py framework
=====

## A complete `cup` application

```python
def hello(web):
return 'Hello, World!'

urls = ('/', hello)

import cup
app = cup.application(urls)
app.run()
```

## `web.py` like application

```python
class Hello:

def GET(self, name):
if not name:
name = 'World'
return 'Hello, ' + name + '!'

urls = ('/(.*)', Hello)

import cup
app = cup.application(urls)
app.run()
```

## `bottle` or `flask` like routed application

```python
import cup

route = cup.Route()

@route.GET('/(.*)')
def hello(ctx, name):
if not name:
name = 'World'
return 'Hello, ' + name + '!'

app = cup.application(route.urls)
app.run()
```

## `web.py` with router
```python
import cup

route = cup.Route()

@route('/(.*)')
class Hello:

def GET(self, name):
if not name:
name = 'World'
return 'Hello, ' + name + '!'

app = cup.application(route.urls)
app.run()
```

Release history Release notifications | RSS feed

3.2.39

1 file

3.2.38

2 files

3.2.36

2 files

3.2.35

2 files

3.2.34

2 files

3.2.33

1 file

3.2.32

2 files

3.2.31

1 file

3.2.30

1 file

3.2.29

1 file

3.2.28

1 file

3.2.27

1 file

3.2.26

1 file

3.2.25

1 file

3.2.24

1 file

3.2.22

1 file

3.2.21

1 file

3.2.20

1 file

3.2.19

1 file

3.2.18

1 file

3.2.16

1 file

3.2.13

1 file

3.2.12

1 file

3.2.7

1 file

3.2.3

1 file

3.2.0

1 file

3.1.0

1 file

2.2.0

1 file

2.0.3

1 file

2.0.2

1 file

This release

0.2.0 This release

0.1.2

0.1.1

0.1.0

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