Skip to main content

No project description provided

Project description

fdk-asgi

pipeline status latest package version supported python versions pre-commit

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.4.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

fdk_asgi-0.4.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file fdk_asgi-0.4.0.tar.gz.

File metadata

  • Download URL: fdk_asgi-0.4.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for fdk_asgi-0.4.0.tar.gz
Algorithm Hash digest
SHA256 70347f4149632a860544bbeb31df7af08fce405ef22cb59c0313710aa442a7e9
MD5 f3677fbf0dc340ec70309da2c5de65ed
BLAKE2b-256 bebfa8454e6c1bfb7f0ce00ab6381577c32701836da156355836c512af2f451e

See more details on using hashes here.

File details

Details for the file fdk_asgi-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: fdk_asgi-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for fdk_asgi-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a04ab0fe2e48871c5db16211c228c2a8e953823e614c7102ba435ccbd674aaf
MD5 c8c1a7e8a220b546c3e4e96459408ade
BLAKE2b-256 1c52976e0368c019f7037e2b10d29a63eaebbf73e17275e00f2d4b6eabfae1ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page