%global _empty_manifest_terminate_build 0 Name: python-lambdarest Version: 13.0.3 Release: 1 Summary: flask like web framework for AWS Lambda License: MIT License Copyright (c) 2017 Trustpilot Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. URL: https://github.com/sloev/python-lambdarest Source0: https://mirrors.nju.edu.cn/pypi/web/packages/97/98/7faadc7212790adfe4f59f0c31a28f48c804114c884db0d694ce2e3d2d01/lambdarest-13.0.3.tar.gz BuildArch: noarch Requires: python3-jsonschema Requires: python3-strict-rfc3339 Requires: python3-werkzeug Requires: python3-pytest Requires: python3-PyYaml Requires: python3-mock Requires: python3-pytest-readme Requires: python3-black %description ![test](https://github.com/sloev/python-lambdarest/actions/workflows/test.yml/badge.svg) [![Latest Version](https://img.shields.io/pypi/v/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) [![Python Support](https://img.shields.io/pypi/pyversions/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) # lambdarest Buy Me A Coffee Python routing mini-framework for [AWS Lambda](https://aws.amazon.com/lambda/) with optional JSON-schema validation. ### Features * `lambda_handler` function constructor with built-in dispatcher * Decorator to register functions to handle HTTP methods * Optional JSON-schema input validation using same decorator ### Merchandise ❤️ You can support the development by [buying a wonderful cup](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) or [buy coffee for the maintainers cup](https://buymeacoffee.com/sloev) [![lambdarest mug](https://raw.githubusercontent.com/sloev/python-lambdarest/master/.github/lambdarest_mug.jpg)](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) ### External articles / tutorials * [devgrok.com: Create a Private Microservice Using an Application Load Balancer](http://www.devgrok.com/2019/03/create-private-microservice-using.html) Article about how to use **lambdarest** with **AWS Application Load Balancer** * [rockset.com: Building a Serverless Microservice Using Rockset and AWS Lambda](https://rockset.com/blog/building-a-serverless-microservice-using-rockset-and-aws-lambda/) Article about how to set up **lambdarest** in AWS infrastructure **Other articles? add them [here](https://github.com/trustpilot/python-lambdarest/issues/55)** ## Installation Install the package from [PyPI](http://pypi.python.org/pypi/) using [pip](https://pip.pypa.io/): ```bash $ pip install lambdarest ``` ## Getting Started This module helps you to handle different HTTP methods in your AWS Lambda. ```python from lambdarest import lambda_handler @lambda_handler.handle("get") def my_own_get(event): return {"this": "will be json dumped"} ##### TEST ##### input_event = { "body": '{}', "httpMethod": "GET", "resource": "/" } result = lambda_handler(event=input_event) assert result == {"body": '{"this": "will be json dumped"}', "statusCode": 200, "headers":{}} ``` ## Documentation See [docs](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md) for **documentation and examples** covering amongst: * [Advanced usage example](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#advanced-usage) * [Query params](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#query-params) * [Headers and MultiValueHeaders](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#headers-and-multivalueheaders) * [Routing](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#routing) * [Authorization Scopes](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#authorization-scopes) * [Exception Handling](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#exception-handling) * [AWS Application Load Balancer](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#aws-application-load-balancer) * [CORS](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#cors) ## Anormal unittest behaviour with `lambda_handler` singleton Because of python unittests leaky test-cases it seems like you shall beware of [this issue](https://github.com/trustpilot/python-lambdarest/issues/16) when using the singleton `lambda_handler` in a multiple test-case scenario. ## Tests Use the following commands to install requirements and run test-suite: ```bash $ pip install -e ".[dev]" $ black tests/ lambdarest/ $ rm -f test_readme.py $ pytest --doctest-modules -vvv ``` For more info see [Contributing...](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) ## Changelog See [HISTORY.md](https://github.com/trustpilot/python-lambdarest/blob/master/docs/HISTORY.md) ## Contributors Thanks for contributing! [@sphaugh](https://github.com/sphaugh), [@amacks](https://github.com/amacks), [@jacksgt](https://github.com/jacksgt), [@mkreg](https://github.com/mkreg), [@aphexer](https://github.com/aphexer), [@nabrosimoff](https://github.com/nabrosimoff), [@elviejokike](https://github.com/elviejokike), [@eduardomourar](https://github.com/eduardomourar), [@devgrok](https://github.com/devgrok), [@AlbertoTrindade](https://github.com/AlbertoTrindade), [@paddie](https://github.com/paddie), [@svdgraaf](https://github.com/svdgraaf), [@simongarnier](https://github.com/simongarnier), [@martinbuberl](https://github.com/martinbuberl), [@adamelmore](https://github.com/adamelmore), [@sloev](https://github.com/sloev) [Wanna contribute?](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) And by the way, we have a [Code Of Friendlyhood!](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CODE_OF_CONDUCT.md) %package -n python3-lambdarest Summary: flask like web framework for AWS Lambda Provides: python-lambdarest BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-lambdarest ![test](https://github.com/sloev/python-lambdarest/actions/workflows/test.yml/badge.svg) [![Latest Version](https://img.shields.io/pypi/v/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) [![Python Support](https://img.shields.io/pypi/pyversions/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) # lambdarest Buy Me A Coffee Python routing mini-framework for [AWS Lambda](https://aws.amazon.com/lambda/) with optional JSON-schema validation. ### Features * `lambda_handler` function constructor with built-in dispatcher * Decorator to register functions to handle HTTP methods * Optional JSON-schema input validation using same decorator ### Merchandise ❤️ You can support the development by [buying a wonderful cup](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) or [buy coffee for the maintainers cup](https://buymeacoffee.com/sloev) [![lambdarest mug](https://raw.githubusercontent.com/sloev/python-lambdarest/master/.github/lambdarest_mug.jpg)](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) ### External articles / tutorials * [devgrok.com: Create a Private Microservice Using an Application Load Balancer](http://www.devgrok.com/2019/03/create-private-microservice-using.html) Article about how to use **lambdarest** with **AWS Application Load Balancer** * [rockset.com: Building a Serverless Microservice Using Rockset and AWS Lambda](https://rockset.com/blog/building-a-serverless-microservice-using-rockset-and-aws-lambda/) Article about how to set up **lambdarest** in AWS infrastructure **Other articles? add them [here](https://github.com/trustpilot/python-lambdarest/issues/55)** ## Installation Install the package from [PyPI](http://pypi.python.org/pypi/) using [pip](https://pip.pypa.io/): ```bash $ pip install lambdarest ``` ## Getting Started This module helps you to handle different HTTP methods in your AWS Lambda. ```python from lambdarest import lambda_handler @lambda_handler.handle("get") def my_own_get(event): return {"this": "will be json dumped"} ##### TEST ##### input_event = { "body": '{}', "httpMethod": "GET", "resource": "/" } result = lambda_handler(event=input_event) assert result == {"body": '{"this": "will be json dumped"}', "statusCode": 200, "headers":{}} ``` ## Documentation See [docs](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md) for **documentation and examples** covering amongst: * [Advanced usage example](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#advanced-usage) * [Query params](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#query-params) * [Headers and MultiValueHeaders](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#headers-and-multivalueheaders) * [Routing](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#routing) * [Authorization Scopes](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#authorization-scopes) * [Exception Handling](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#exception-handling) * [AWS Application Load Balancer](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#aws-application-load-balancer) * [CORS](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#cors) ## Anormal unittest behaviour with `lambda_handler` singleton Because of python unittests leaky test-cases it seems like you shall beware of [this issue](https://github.com/trustpilot/python-lambdarest/issues/16) when using the singleton `lambda_handler` in a multiple test-case scenario. ## Tests Use the following commands to install requirements and run test-suite: ```bash $ pip install -e ".[dev]" $ black tests/ lambdarest/ $ rm -f test_readme.py $ pytest --doctest-modules -vvv ``` For more info see [Contributing...](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) ## Changelog See [HISTORY.md](https://github.com/trustpilot/python-lambdarest/blob/master/docs/HISTORY.md) ## Contributors Thanks for contributing! [@sphaugh](https://github.com/sphaugh), [@amacks](https://github.com/amacks), [@jacksgt](https://github.com/jacksgt), [@mkreg](https://github.com/mkreg), [@aphexer](https://github.com/aphexer), [@nabrosimoff](https://github.com/nabrosimoff), [@elviejokike](https://github.com/elviejokike), [@eduardomourar](https://github.com/eduardomourar), [@devgrok](https://github.com/devgrok), [@AlbertoTrindade](https://github.com/AlbertoTrindade), [@paddie](https://github.com/paddie), [@svdgraaf](https://github.com/svdgraaf), [@simongarnier](https://github.com/simongarnier), [@martinbuberl](https://github.com/martinbuberl), [@adamelmore](https://github.com/adamelmore), [@sloev](https://github.com/sloev) [Wanna contribute?](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) And by the way, we have a [Code Of Friendlyhood!](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CODE_OF_CONDUCT.md) %package help Summary: Development documents and examples for lambdarest Provides: python3-lambdarest-doc %description help ![test](https://github.com/sloev/python-lambdarest/actions/workflows/test.yml/badge.svg) [![Latest Version](https://img.shields.io/pypi/v/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) [![Python Support](https://img.shields.io/pypi/pyversions/lambdarest.svg)](https://pypi.python.org/pypi/lambdarest) # lambdarest Buy Me A Coffee Python routing mini-framework for [AWS Lambda](https://aws.amazon.com/lambda/) with optional JSON-schema validation. ### Features * `lambda_handler` function constructor with built-in dispatcher * Decorator to register functions to handle HTTP methods * Optional JSON-schema input validation using same decorator ### Merchandise ❤️ You can support the development by [buying a wonderful cup](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) or [buy coffee for the maintainers cup](https://buymeacoffee.com/sloev) [![lambdarest mug](https://raw.githubusercontent.com/sloev/python-lambdarest/master/.github/lambdarest_mug.jpg)](https://www.redbubble.com/i/mug/Lambdarest-by-sloev/73793554.9Q0AD) ### External articles / tutorials * [devgrok.com: Create a Private Microservice Using an Application Load Balancer](http://www.devgrok.com/2019/03/create-private-microservice-using.html) Article about how to use **lambdarest** with **AWS Application Load Balancer** * [rockset.com: Building a Serverless Microservice Using Rockset and AWS Lambda](https://rockset.com/blog/building-a-serverless-microservice-using-rockset-and-aws-lambda/) Article about how to set up **lambdarest** in AWS infrastructure **Other articles? add them [here](https://github.com/trustpilot/python-lambdarest/issues/55)** ## Installation Install the package from [PyPI](http://pypi.python.org/pypi/) using [pip](https://pip.pypa.io/): ```bash $ pip install lambdarest ``` ## Getting Started This module helps you to handle different HTTP methods in your AWS Lambda. ```python from lambdarest import lambda_handler @lambda_handler.handle("get") def my_own_get(event): return {"this": "will be json dumped"} ##### TEST ##### input_event = { "body": '{}', "httpMethod": "GET", "resource": "/" } result = lambda_handler(event=input_event) assert result == {"body": '{"this": "will be json dumped"}', "statusCode": 200, "headers":{}} ``` ## Documentation See [docs](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md) for **documentation and examples** covering amongst: * [Advanced usage example](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#advanced-usage) * [Query params](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#query-params) * [Headers and MultiValueHeaders](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#headers-and-multivalueheaders) * [Routing](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#routing) * [Authorization Scopes](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#authorization-scopes) * [Exception Handling](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#exception-handling) * [AWS Application Load Balancer](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#aws-application-load-balancer) * [CORS](https://github.com/trustpilot/python-lambdarest/blob/master/docs/README.md#cors) ## Anormal unittest behaviour with `lambda_handler` singleton Because of python unittests leaky test-cases it seems like you shall beware of [this issue](https://github.com/trustpilot/python-lambdarest/issues/16) when using the singleton `lambda_handler` in a multiple test-case scenario. ## Tests Use the following commands to install requirements and run test-suite: ```bash $ pip install -e ".[dev]" $ black tests/ lambdarest/ $ rm -f test_readme.py $ pytest --doctest-modules -vvv ``` For more info see [Contributing...](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) ## Changelog See [HISTORY.md](https://github.com/trustpilot/python-lambdarest/blob/master/docs/HISTORY.md) ## Contributors Thanks for contributing! [@sphaugh](https://github.com/sphaugh), [@amacks](https://github.com/amacks), [@jacksgt](https://github.com/jacksgt), [@mkreg](https://github.com/mkreg), [@aphexer](https://github.com/aphexer), [@nabrosimoff](https://github.com/nabrosimoff), [@elviejokike](https://github.com/elviejokike), [@eduardomourar](https://github.com/eduardomourar), [@devgrok](https://github.com/devgrok), [@AlbertoTrindade](https://github.com/AlbertoTrindade), [@paddie](https://github.com/paddie), [@svdgraaf](https://github.com/svdgraaf), [@simongarnier](https://github.com/simongarnier), [@martinbuberl](https://github.com/martinbuberl), [@adamelmore](https://github.com/adamelmore), [@sloev](https://github.com/sloev) [Wanna contribute?](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CONTRIBUTING.md) And by the way, we have a [Code Of Friendlyhood!](https://github.com/trustpilot/python-lambdarest/blob/master/docs/CODE_OF_CONDUCT.md) %prep %autosetup -n lambdarest-13.0.3 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-lambdarest -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot - 13.0.3-1 - Package Spec generated