joshua-light / chalice-restful Goto Github PK
View Code? Open in Web Editor NEWRESTful API framework for Chalice.
License: MIT License
RESTful API framework for Chalice.
License: MIT License
master
branch.pytest
should be used as a test runner.Initial project structure will help future development of the features.
pytest
.As an API developer, I want to define my endpoints using object-oriented style.
Chalice uses a plain functions approach, where each endpoint is defined by a separate function decorated with the route
decorator. For example:
app = Chalice(...)
@app.route('/a')
def a(): ...
@app.route('/b')
def b(): ...
@app.route('/c')
def c(): ...
When there are a lot of endpoints, related to different resources, we need to group functions together, and this in fact is a motivation for the Resource
concept.
The API will be similar to flask-restful one.
@route('/v1/items')
class Items(Resource):
def get(): ...
def post(): ...
@route('/v1/items/{item})
class Item(Resource):
def get(item: str): ...
def patch(item: str): ...
def delete(item: str): ...
app = Chalice(...)
api = Api(app)
api.add_resource(Items)
api.add_resource(Item)
Resource
class.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.