Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Python outbound HTTP support #124

Closed
ereslibre opened this issue Nov 21, 2023 · 2 comments
Closed

Publish Python outbound HTTP support #124

ereslibre opened this issue Nov 21, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request python

Comments

@ereslibre
Copy link
Contributor

ereslibre commented Nov 21, 2023

Is your feature request related to a problem? Please describe.

Wasm Workers Server has an interface for allowing WebAssembly modules to make outbound HTTP requests.

Provide a Python interpreter based on our Python assets that has support for Python scripts to make HTTP requests by using the explicit HTTP wws interface.

This is the most straightforward solution in the sense that the python script needs to import wws_http (or some module name similar to this), and use this interface to make outbound HTTP requests.

A next step would be to integrate the Python standard library with this system, but this is a feature outside of the scope of this issue.

Describe the solution you'd like

A python script like the following:

import wws_http

_, _, status_code, success = wws_http.send_http_request(
  "https://google.com,
  "GET",
  [],
  [],
  ""
)

Will make a GET HTTP request to "https://google.com". This issue does not provide a suggestion on how the API should look like: a more idiomatic Python API is perfectly fine and desired.

New Python interpreters with WWS HTTP support are provided in the asset list of releases.

Describe alternatives you've considered

No response

Additional context

No response

@ereslibre ereslibre added enhancement New feature or request python labels Nov 21, 2023
@ereslibre ereslibre self-assigned this Nov 21, 2023
@ereslibre
Copy link
Contributor Author

Related: vmware-labs/wasm-workers-server#176

@ereslibre
Copy link
Contributor Author

This Python runtime will be provided in the wws repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

No branches or pull requests

1 participant