No project description provided
Project description
fdk-asgi
An alternative FDK to easily run any ASGI application on OCI Functions behind an API Gateway.
Documentation on the Open Fn Project and OCI Functions
Example request:
POST /call HTTP/1.1
Fn-Call-Id : 12345678910
Fn-Deadline: <date/time>
Fn-Http-Request-Url: https://my.fn.com/t/hello/world
Fn-Http-Request-Method: PUT
Fn-Http-H-Custom-Header: foo
Content-type: text/plain
<Body here>
Example Response:
HTTP/1.1 200 OK
Fn-Http-Status: 204
Fn-Http-H-My-Header: foo
Fn-Fdk-Version: fdk-go/0.0.42
Content-type: text/plain
<Body here>
For more info see Fn container contract.
Notes:
- 0666 contract can be fulfilled by
gunicorn --umask 0666
.
Default Environment Variables
Here is the list of automatically generated environment variables that are available to your functions.
Fn Generated Var | Sample Value | Description |
---|---|---|
FN_APP_ID |
01NNNNNNNNNG8G00GZJ0000001 |
The application ID for the app the current function is contained in. |
FN_FN_ID |
01DYNNNNNNNG8G00GZJ0000002 |
The ID of the current function |
FN_FORMAT |
http-stream |
Communications protocol. (Deprecated) |
FN_LISTENER |
unix:/tmp/iofs/lsnr.sock |
The Unix socket address (prefixed with “unix:”) on the file system that the FDK should create to listen for requests. The platform will guarantee that this directory is writable to the function. FDKs must not write any other data than the unix socket to this directory. |
FN_MEMORY |
128 |
The maximum memory of the function in MB. |
FN_TYPE |
sync |
The type of function. Always sync currently. |
Source: Fn Project: Using Config Variables and Environment Variables
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fdk_asgi-0.3.0.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file fdk_asgi-0.3.0.tar.gz
.
File metadata
- Download URL: fdk_asgi-0.3.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e3a51b359ca2e2c9da4df67c891f5a4ed3ef78709660e0bbb3a14ad72e4804b |
|
MD5 | a0c55d23de4a9a5f3ab59e1a4c5d0c4a |
|
BLAKE2b-256 | 351faa006c7c7bb82017e7701577b7a75075e81f152555fd3f33c1684845baca |
File details
Details for the file fdk_asgi-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: fdk_asgi-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bb4f209b4f7c21137a137e1bfc4f98900aaa86d4258ce1229d78916b782fa6e |
|
MD5 | 831906eb4875524582b8ca5de367263e |
|
BLAKE2b-256 | 2a33e19ee3abe24295f13ace39bf36dff3e68fc1d64fa74625a2bbd61f02db71 |