Skip to main content

No project description provided

Project description

fdk-asgi

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

Uploaded Source

Built Distribution

fdk_asgi-0.2.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fdk_asgi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 111ddfe68c700a5dc2fc4854a35cdb4a9cc04e4d4352e5d8a3b107c24f58f446
MD5 525882a9af24e09401fbfc0a8741472a
BLAKE2b-256 156ff8aea4e2e70d310ea19c3ea0b53ca32e4926cda577b5edb1c45dbf3372e5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fdk_asgi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7020febbfc59a9e7561766394a8427e121d6d77719a6e3f030fa7fd1a4e0b52c
MD5 b88789a520bc04188eb22619a5dc7333
BLAKE2b-256 834451aefe2168523adcc3b5269db55406ca20a40d17d963863688b8d81a7b74

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