Skip to main content

1 Introduction

REST APIs documented and sensible

Build automatically documented REST APIs with the Pyramid framework.

This library is available on the Python package index under the project name rapids:

2 Usage

@rapids.decorators.resource('', None)
class Root(rapids.resources.Base):
    pass


@pyramid.view.view_config(context=Root, rapids='')
def root_view(resource, request):
    return pyramid.httpexceptions.HTTPNotFound()


@rapids.decorators.resource('foo', Root)
class Foo(rapids.resources.Base):
    pass


@pyramid.view.view_defaults(context=Foo, rapids='')
class FooView:
    def __init__(self, resource, request):
        pass

    @pyramid.view.view_config(request_method='GET')
    def _get_view(self):
        return pyramid.httpexceptions.HTTPOk()

    @pyramid.view.view_config(request_method='POST')
    def _post_view(self):
        return pyramid.httpexceptions.HTTPCreated()

3 Hacking

This project makes extensive use of tox, pytest, and GNU Make.

3.1 Development environment

Use following command to create a Python virtual environment with all necessary dependencies:

tox --recreate -e develop

This creates a Python virtual environment in the .tox/develop directory. It can be activated with the following command:

. .tox/develop/bin/activate

3.2 Run test suite

In a Python virtual environment run the following command:

make review

Outside of a Python virtual environment run the following command:

tox --recreate

3.3 Build and package

In a Python virtual environment run the following command:

make package

Outside of a Python virtual environment run the following command:

tox --recreate -e package

Metadata

Release files for rapids 0.0.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 rapids 0.0.1
File Size Uploaded
rapids-0.0.1.tar.gz 10.5 kB Details

Built distribution (wheel)

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

Total release size: 20.7 kB

Release files / rapids-0.0.1.tar.gz

Download URL rapids-0.0.1.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a2a98d9a52aea3039603bb822382755ac418bb68612a12404a9d5fedc8d66edf
BLAKE2b-256 checksum
How to use checksums
7ff19d14fbd8978e0155562d03e14126e90ac6ac9705c276f4b45fd36a013027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / rapids-0.0.1-py3-none-any.whl

Download URL rapids-0.0.1-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd614eae1478bea845b357e03473d87e17665c38547ee774b22ddf0c1922c4e0
BLAKE2b-256 checksum
How to use checksums
e1511c8cbc90cbf1778699d0f9be280c84fac8058dcfc1da20d9976489cbae69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

1 release file

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