1.1.0 • Published 8 years ago
pykg v1.1.0
What is this?
A thin shell around npm for installing Python libraries
Installation
npm i -g pykgUsage
Add some dependencies
pykg install requests djangoRun an npm script
NB: Only npm start is supported now
pykg start # equivalent to npm start, with $PYTHONPATH set appropriatelyKnown limitations
- Doesn't support libraries with native extensions
- Only been tested with requests and django so far https://github.com/jogjayr/npm-for-py
- I only have 6 Python libraries up on the NPM registry so far
FAQs
Why?
To see if it could be done
No seriously...why?
I like npm/yarn. I thought this would be a good way to learn how Python libraries actually get installed.
Are there any advantages to using this?
- You can take advantage of NPM/yarn features such as local caching for offline installs, lockfiles etc.
package.jsonis a standard in the NPM-world.setup.pyandrequirements.txtfulfill some of the functions but not all- You don't need virtualenv. npm/yarn installs dependencies into
node_modulesby default andpykgsets thePYTHONPATHso that imports just work when invokingpackage.jsonscripts