Skip to content

Commit a630507

Browse files
committed
Updated Readme with pipenv info
1 parent 60b380e commit a630507

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,49 @@ Encapsulate common rest operations between business services propagating trace h
3535

3636
### pyms/tracer
3737
Create an injector `flask_opentracing.FlaskTracer` to use in our projects
38+
39+
## Pipenv
40+
41+
### Advantages over plain pip and requirements.txt
42+
[Pipenv](https://pipenv.readthedocs.io/en/latest/) generates two files: a `Pipfile`and a `Pipfile.lock`.
43+
* `Pipfile`: Is a high level declaration of the dependencies of your project. It can contain "dev" dependencies (usually test related stuff) and "standard" dependencies which are the ones you'll need for your project to function
44+
* `Pipfile.lock`: Is the "list" of all the dependencies your Pipfile has installed, along with their version and their hashes. This prevents two things: Conflicts between dependencies and installing a malicious module.
45+
46+
### How to...
47+
48+
Here the most 'common' `pipenv` commands, for a more in-depth explanation please refer to the [official documentation](https://pipenv.readthedocs.io/en/latest/).
49+
50+
#### Install pipenv
51+
```bash
52+
pip install pipenv
53+
```
54+
55+
#### Install dependencies defined in a Pipfile
56+
```bash
57+
pipenv install
58+
```
59+
60+
#### Install both dev and "standard" dependencies defined in a Pipfile
61+
```bash
62+
pipenv install --dev
63+
```
64+
65+
#### Install a new module
66+
```bash
67+
pipenv install django
68+
```
69+
70+
#### Install a new dev module (usually test related stuff)
71+
```bash
72+
pipenv install nose --dev
73+
```
74+
75+
#### Install dependencies in production
76+
```bash
77+
pipenv install --deploy
78+
```
79+
80+
#### Start a shell
81+
```bash
82+
pipenv shell
83+
```

0 commit comments

Comments
 (0)