Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pyodide

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyodide - npm Package Compare versions

Comparing version 0.19.0-alpha.1 to 0.19.0

26

api.js

@@ -288,22 +288,22 @@ import { Module } from "./module.js";

* Imports a module and returns it.
* Warning: this function has a completely different behavior than the old removed pyimport function!
* ``pyimport`` is roughly equivalent to:
*
* .. code-block:: pyodide
* .. admonition:: Warning
* :class: warning
*
* This function has a completely different behavior than the old removed pyimport function!
*
* ``pyimport`` is roughly equivalent to:
*
* .. code-block:: js
*
* pyodide.runPython(`import ${pkgname}; ${pkgname}`);
*
* except that the global namespace will not change.
* Example:
* except that the global namespace will not change.
*
* .. code-block:: pyodide
* Example:
*
* let sysmodule = pyodide.pyimport("sys");
* let recursionLimit = sys.getrecursionlimit();
* .. code-block:: js
*
* The best way to run Python code with Pyodide is
* 1. write a Python package,
* 2. load your Python package into the Pyodide (Emscripten) file system,
* 3. import the package with `let mypkg = pyodide.pyimport("mypkgname")`,
* 4. call into your package with `mypkg.some_api(some_args)`.
* let sysmodule = pyodide.pyimport("sys");
* let recursionLimit = sys.getrecursionlimit();
*

@@ -310,0 +310,0 @@ * @param {string} mod_name The name of the module to import

{
"name": "pyodide",
"version": "0.19.0-alpha.1",
"version": "0.19.0",
"description": "The Pyodide JavaScript package",

@@ -5,0 +5,0 @@ "keywords": [

@@ -107,5 +107,5 @@ /**

/**
* @private
* Just like `runPython` except uses a different globals dict and gets
* `eval_code` from `_pyodide` so that it can work before `pyodide` is imported.
* @private
*/

@@ -117,3 +117,2 @@ Module.runPythonInternal = function (code) {

/**
* @private
* A proxy around globals that falls back to checking for a builtin if has or

@@ -123,2 +122,3 @@ * get fails to find a global with the given key. Note that this proxy is

* will translate this proxy to the globals dictionary.
* @private
*/

@@ -174,3 +174,2 @@ function wrapPythonGlobals(globals_dict, builtins_dict) {

/**
* @private
* This function is called after the emscripten module is finished initializing,

@@ -180,2 +179,3 @@ * so eval_code is newly available.

* the core `pyodide` apis. (But package loading is not ready quite yet.)
* @private
*/

@@ -182,0 +182,0 @@ function finalizeBootstrap(config) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc