![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Asynchronous utils for Node.js/IO.js focused on generators.
Just run the following:
npm install gensy
Remember to add gensy
as a dependency in your package.json
file:
"dependencies": {
...
"gensy": "*"
...
}
If you just want to run a generator to run some asynchronous code as if it were synchronous (by mean of the yield
statement), just call gensy
as follows:
var gensy = require('gensy');
gensy(function* (next) {
try {
...
var x = yield foo(next);
...
} catch (error) {
console.warn('Error:', error);
}
});
Where foo
is supposed to be an asynchronous function that uses next
as a callback following the error+result arguments convention:
function foo(callback) {
...
return callback(error, result);
}
If an error is returned by foo
, then generator's catch
block will be executed.
This usage supports a callback to listen generator end. To use it the generator must call done()
(a second argument) when finished:
var gensy = require('gensy');
function* genA(next, done) {
try {
var x = yield foo(next);
...
return done();
} catch (error) {
console.warn('Error:', error);
}
}
gensy(genA);
To run a list of generators, one by one, use gensy.series()
as follows:
var gensy = require('gensy');
function* genA (next, done) {
try {
var x = yield foo(next);
...
return done();
} catch (error) {
console.warn('Error:', error);
}
}
function* genB (next, done) {
try {
var x = yield foo(next);
...
return done();
} catch (error) {
console.warn('Error:', error);
}
}
gensy.series([genA, genB], function () {
console.log('Series ended');
});
FAQs
Asynchronous utils focused on generators
The npm package gensy receives a total of 95 weekly downloads. As such, gensy popularity was classified as not popular.
We found that gensy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.