progress!

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-01-10 09:33:31 -05:00
parent e4d2c1009c
commit f7d6f9c101
2 changed files with 35 additions and 3 deletions
+34 -2
View File
@@ -1,2 +1,34 @@
# pipenvlib
A library for manipulating Pipenv projects.
# PipenvLib: A library for manipulating Pipenv projects.
This library exists to make it easy to programatically interact with / introspect / manipulate Pipenv projects.
**It allows you examine depenencies and requirements of a project, as well as install/uninstall packages from Python directly.**
## Example Usage
```python
import pipenvlib
# Establish where the Pipenv project lives.
project = pipenvlib.PipenvProject('.')
```
```pycon
>>> project.packages
[<Depedency 'toml' constraint='*'>, <Depedency 'delegator.py' constraint='*'>]
>>> project.locked_package
[<LockedDepedency 'delegator.py==0.0.14'>, <LockedDepedency 'pexpect==4.3.1'>, <LockedDepedency 'ptyprocess==0.5.2'>, <LockedDepedency 'toml==0.9.4'>]
>>> project.install('requests', dev=True)
True
>>> project.dev_packages
[<Depedency 'requests' constraint='*'>]
```
------------
This project (which is a work in progress) was built to facilitate the development of a Sublime Text 3 plugin (which in the works).
+1 -1
View File
@@ -180,7 +180,7 @@ class PipenvProject(object):
dev = '' if not dev else '--dev'
return self._run('install {0} {1}'.format(package_name)).return_code == 0
return self._run('install {0} {1}'.format(package_name, dev)).return_code == 0
def uninstall(self, package_name):
"""Uninstalls a given package from the pipenv project."""