Metadata-Version: 2.1
Name: rivr
Version: 0.10.0
Summary: microweb framework
License: BSD
Author: Kyle Fuller
Author-email: kyle@fuller.li
Requires-Python: >=3.6,<4.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown

# rivr

rivr is a Python WSGI Compatible microweb framework. Following a design similar to Django.

## Examples

### Simple views

```python
def hello_world(request):
    return Response('Hello, World!', content_type='text/plain')
```

### Routing

```python
router = Router()

@router.register(r'^$')
def index(request):
    return Response('Hello world.')

@router.register(r'^test/$')
def test(request):
    return Response('Testing!')
```

### Class based views

```python
class ExampleView(View):
    def get(self, request):
        return Response('Hi')
```

## Testing

rivr exposes a `TestClient` which allows you to create requests and get a
response. Simply pass the TestClient your view, router or application and you
can make requests using the testing DSL to get a response.

```python
from rivr.tests import TestClient

class TestCase(unittest.TestCase):
    def setUp(self):
        self.client = TestClient(router)

    def test_status(self):
        assert self.client.get('/status/').status_code is 204
```

## License

rivr is released under the BSD license. See [LICENSE](LICENSE).


