
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
azurefunctions-extensions-http-fastapi
Advanced tools
This library contains HttpV2 extensions for FastApi Request/Response types to use in your function app code.
Source code | Package (PyPi) | Developer Reference | Samples
azurefunctions-extensions-http-fastapi
to your requirements.txtazurefunctions.extensions.http.fastapi
in your HttpTrigger functions.azurefunctions.extensions.http.fastapi
."PYTHON_ENABLE_INIT_INDEXING": "1"
to your local.settings.json file or App Settings.The Azure Functions Extensions HTTP FastApi library for Python allows you to create a function app with FastApi Request or Response types. When your function runs, you will receive the FastApi Request type, and you can return a FastApi Response type.
FastApi is one of the top Python web frameworks that provides elegant and powerful Request/Response types and functionalities. With this integration, you are empowered to use Request/Response types the same way as with native FastApi. For example, HTTP streaming upload and download scenarios are now possible! Please reference the FastApi documentation for further information.
# This function app receives streaming data from a client and processes it in real-time.
# It demonstrates streaming upload capabilities for scenarios such as uploading large files,
# processing continuous data streams, or handling IoT device data.
import azure.functions as func
from azurefunctions.extensions.http.fastapi import Request, JSONResponse
app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)
@app.route(route="streaming_upload", methods=[func.HttpMethod.POST])
async def streaming_upload(req: Request) -> JSONResponse:
"""Handle streaming upload requests."""
# Process each chunk of data as it arrives
async for chunk in req.stream():
process_data_chunk(chunk)
# Once all data is received, return a JSON response indicating successful processing
return JSONResponse({"status": "Data uploaded and processed successfully"})
def process_data_chunk(chunk: bytes):
"""Process each data chunk."""
# Add custom processing logic here
pass
Get started with our FastApi samples.
Several samples are available in this GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with FastApi:
fastapi_samples_streaming_upload - An example on how to send and receive a streaming request within your function.
fastapi_samples_streaming_download - An example on how to send your HTTP response via streaming to the caller.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
FastApi Python worker extension for Azure Functions.
We found that azurefunctions-extensions-http-fastapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.