aws/chalice — 11.1k★ trên GitHub (Python). Python Serverless Microframework for AWS
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
.. image:: https://aws.github.io/chalice/_static/img/chalice-logo-whitespace.png
:target: https://aws.github.io/chalice/
:alt: Chalice Logo
Chalice is a framework for writing serverless apps in Python. It allows
you to quickly create and deploy applications that use AWS Lambda. It provides:
A command line tool for creating, deploying, and managing your app
A decorator based API for integrating with Amazon API Gateway, Amazon S3,
Amazon SNS, Amazon SQS, and other AWS services.
from chalice import Chalice
app = Chalice(app_name="helloworld")
# Whenever an object is uploaded to "mybucket"
# this lambda function will be invoked.
@app.on_s3_event(bucket="mybucket")
def handler(event):
print(
f"Object uploaded for bucket: {event.bucket}, key: {event.key}"
)
As well as an SQS queue:
.. code-block:: python
from chalice import Chalice
app = Chalice(app_name="helloworld")
# Invoke this lambda function whenever a message
# is sent to the ``my-queue-name`` SQS queue.
@app.on_sqs_message(queue="my-queue-name")
def handler(event):
for record in event:
print(f"Message body: {record.body}")
And several other AWS resources.
Once you've written your code, you just run chalice deploy
and Chalice takes care of deploying your app.
Up and running in less than 30 seconds.
Give this project a try and share your feedback with us here on GitHub.
The documentation is available
here <https://aws.github.io/chalice/>__.
Quickstart
.. quick-start-begin
In this tutorial, you'll use the chalice command line utility
to create and deploy a basic REST API. This quickstart uses Python 3.10,
but AWS Chalice supports all versions of Python supported by AWS Lambda,
which includes Python 3.10 through Python 3.15.
To install Chalice, we'll first create and activate a virtual environment
in python3.10::
Before you can deploy an application, be sure you have
credentials configured. If you have previously configured your
machine to run boto3 (the AWS SDK for Python) or the AWS CLI then
you can skip this section.
If this is your first time configuring credentials for AWS you
can follow these steps to quickly get started::
If you want more information on all the supported methods for
configuring credentials, see the
boto3 docs <https://docs.aws.amazon.com/boto3/latest/guide/configuration.html>__.
Creating Your Project
The next thing we'll do is use the chalice command to create a new
project::
$ chalice new-project helloworld
This will create a helloworld directory. Cd into this
directory. You'll see several files have been created for you::
$ cd helloworld
$ ls -la
drwxr-xr-x .chalice
-rw-r--r-- app.py
-rw-r--r-- requirements.txt
You can ignore the .chalice directory for now, the two main files
we'll focus on is app.py and requirements.txt.
Choose from among several guided tutorials that will
give you step-by-step examples of various features of Chalice.
Topics <https://aws.github.io/chalice/topics/index.html>__ - Deep
dive into documentation on specific areas of Chalice.
This contains more detailed documentation than the tutorials.
API Reference <https://aws.github.io/chalice/api.html>__ - Low level
reference documentation on all the classes and methods that are part of the
public API of Chalice.
If you're done experimenting with Chalice and you'd like to cleanup, you can
use the chalice delete command, and Chalice will delete all the resources
it created when running the chalice deploy command.
::
$ chalice delete
Deleting Rest API: abcd4kwyl4
Deleting function arn:aws:lambda:region:123456789012:function:helloworld-dev
Deleting IAM Role helloworld-dev
Feedback
We'd also love to hear from you. Please create any GitHub issues for
additional features you'd like to see over at
https://github.com/aws/chalice/issues.
aws/chalice có 11.1k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/aws/chalice. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
aws/chalice có những chủ đề gì?
GitHub topics của aws/chalice: "aws", "aws-apigateway", "aws-lambda", "cloud", "lambda", "python", "python27", "python3", "serverless", "serverless-framework". TopGit xếp repo vào nhóm Backend.
aws/chalice có phải mã nguồn mở không?
Có — aws/chalice phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/aws/chalice.
aws/chalice có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho aws/chalice. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
aws/chalice còn đang phát triển không?
Commit gần nhất trên aws/chalice là 9 ngày trước (theo timestamp GitHub). Repo có 1.0k fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Cùng nhóm Backend còn repo nào?
aws/chalice thuộc nhóm Backend trên TopGit, cùng 10 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về aws/chalice ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/aws/chalice là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về chalice?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về chalice.