1PIPREQS(1)                          pipreqs                         PIPREQS(1)
2
3
4

NAME

6       pipreqs - pipreqs Documentation
7
8       Contents:
9

PIPREQS - GENERATE REQUIREMENTS.TXT FILE FOR ANY PROJECT BASED ON IMPORTS

11       .SS Installation
12
13          pip install pipreqs
14
15   Usage
16          Usage:
17              pipreqs [options] <path>
18
19          Options:
20              --use-local           Use ONLY local package info instead of querying PyPI
21              --pypi-server <url>   Use custom PyPi server
22              --proxy <url>         Use Proxy, parameter will be passed to requests library. You can also just set the
23                                    environments parameter in your terminal:
24                                    $ export HTTP_PROXY="http://10.10.1.10:3128"
25                                    $ export HTTPS_PROXY="https://10.10.1.10:1080"
26              --debug               Print debug information
27              --ignore <dirs>...    Ignore extra directories
28              --encoding <charset>  Use encoding parameter for file open
29              --savepath <file>     Save the list of requirements in the given file
30              --print               Output the list of requirements in the standard output
31              --force               Overwrite existing requirements.txt
32              --diff <file>         Compare modules in requirements.txt to project imports.
33              --clean <file>        Clean up requirements.txt by removing modules that are not imported in project.
34
35   Example
36          $ pipreqs /home/project/location
37          Successfully saved requirements file in /home/project/location/requirements.txt
38
39       Contents of requirements.txt
40
41          wheel==0.23.0
42          Yarg==0.1.9
43          docopt==0.6.2
44
45   Why not pip freeze?
46       · pip  freeze  only  saves  the  packages  that  are installed with pip
47         install in your environment.
48
49       · pip freeze saves all packages in the environment including those that
50         you don't use in your current project. (if you don't have virtualenv)
51
52       · and  sometimes  you  just  need  to create requirements.txt for a new
53         project without installing modules.
54

INSTALLATION

56       At the command line:
57
58          $ easy_install pipreqs
59
60       Or, if you have virtualenvwrapper installed:
61
62          $ mkvirtualenv pipreqs
63          $ pip install pipreqs
64

USAGE

66       To use pipreqs in a project:
67
68          import pipreqs
69

CONTRIBUTING

71       Contributions are welcome, and they are greatly appreciated! Every lit‐
72       tle bit helps, and credit will always be given.
73
74       You can contribute in many ways:
75
76   Types of Contributions
77   Report Bugs
78       Report bugs at https://github.com/bndr/pipreqs/issues.
79
80       If you are reporting a bug, please include:
81
82       · Your operating system name and version.
83
84       · Any  details  about  your  local setup that might be helpful in trou‐
85         bleshooting.
86
87       · Detailed steps to reproduce the bug.
88
89   Fix Bugs
90       Look through the GitHub issues for bugs. Anything tagged with "bug"  is
91       open to whoever wants to implement it.
92
93   Implement Features
94       Look through the GitHub issues for features. Anything tagged with "fea‐
95       ture" is open to whoever wants to implement it.
96
97   Write Documentation
98       pipreqs could always use more documentation, whether  as  part  of  the
99       official pipreqs docs, in docstrings, or even on the web in blog posts,
100       articles, and such.
101
102   Submit Feedback
103       The  best  way  to   send   feedback   is   to   file   an   issue   at
104       https://github.com/bndr/pipreqs/issues.
105
106       If you are proposing a feature:
107
108       · Explain in detail how it would work.
109
110       · Keep the scope as narrow as possible, to make it easier to implement.
111
112       · Remember  that this is a volunteer-driven project, and that contribu‐
113         tions are welcome :)
114
115   Get Started!
116       Ready to contribute? Here's how to set up pipreqs  for  local  develop‐
117       ment.
118
119       1. Fork the pipreqs repo on GitHub.
120
121       2. Clone your fork locally:
122
123             $ git clone git@github.com:your_name_here/pipreqs.git
124
125       3. Install  your  local  copy into a virtualenv. Assuming you have vir‐
126          tualenvwrapper installed, this is how you set up your fork for local
127          development:
128
129             $ mkvirtualenv pipreqs
130             $ cd pipreqs/
131             $ python setup.py develop
132
133       4. Create a branch for local development:
134
135             $ git checkout -b name-of-your-bugfix-or-feature
136
137          Now you can make your changes locally.
138
139       5. When you're done making changes, check that your changes pass flake8
140          and the tests, including testing other Python versions with tox:
141
142             $ flake8 pipreqs tests
143             $ python setup.py test
144             $ tox
145
146          To get flake8 and tox, just pip install them into your virtualenv.
147
148       6. Commit your changes and push your branch to GitHub:
149
150             $ git add .
151             $ git commit -m "Your detailed description of your changes."
152             $ git push origin name-of-your-bugfix-or-feature
153
154       7. Submit a pull request through the GitHub website.
155
156   Pull Request Guidelines
157       Before you submit a pull request, check that it meets these guidelines:
158
159       1. The pull request should include tests.
160
161       2. If the pull request adds functionality, the docs should be  updated.
162          Put your new functionality into a function with a docstring, and add
163          the feature to the list in README.rst.
164
165       3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, 3.5,
166          and for PyPy. Check https://travis-ci.org/bndr/pipreqs/pull_requests
167          and make sure that the tests pass for all supported Python versions.
168
169   Tips
170       To run a subset of tests:
171
172          $ python -m unittest tests.test_pipreqs
173

CREDITS

175   Development Lead
176       · Vadim Kravcenko <vadim.kravcenko@gmail.com>
177
178   Contributors
179       None yet. Why not be the first?
180

HISTORY

0.4.8

183       · Implement '--clean' and '--diff' (kxrd)
184
185       · Exclude concurrent{,.futures} from stdlib if py2 (kxrd)
186

0.4.7

188       · BUG: remove package/version duplicates
189
190       · Style: pep8
191

0.4.5

193       · Fixed the --pypi-server option
194

0.4.4 (2016-07-14)

196       · Remove Spaces in output
197
198       · Add package to output even without version
199

0.4.2 (2016-02-10)

201       · Fix duplicated lines in requirements.txt (Dmitry Pribysh)
202

0.4.1 (2016-02-05)

204       · Added ignore option (Nick Rhinehart)
205

0.4.0 (2016-01-28)

207       · Walk Abstract Syntax Tree to find imports (Kay Sackey)
208

0.3.9 (2016-01-20)

210       · Fix regex for docstring comments (#35)
211

0.3.8 (2016-01-12)

213       · Add more package mapping
214
215       · fix(pipreqs/mapping): remove pylab reference to matplotlib
216
217       · Remove comments """ before going through imports
218
219       · Update proxy documentation
220

0.3.1 (2015-10-20)

222       · fixed lint warnings (EJ Lee)
223
224       · add --encoding parameter for open() (EJ Lee)
225
226       · support windows directory separator (EJ Lee)
227

0.3.0 (2015-09-29)

229       · Add --proxy option
230
231       · Add --pypi-server option
232

0.2.9 (2015-09-24)

234       · Ignore irreverent directory when generating requirement.txt (Lee Wei)
235
236       · Modify logging level of "Requirement.txt already exists"  to  warning
237         (Lee Wei)
238

0.2.8 (2015-05-11)

240       · Add --force option as a protection for overwrites
241

0.2.6 (2015-05-11)

243       · Fix exception when 'import' is used inside package name #17
244
245       · Add more tests
246

0.2.5 (2015-05-11)

248       · Fix exception when 'import' is used in comments #17
249
250       · Fix duplicate entries in requirements.txt
251

0.2.4 (2015-05-10)

253       · Refactoring
254
255       · fix "import as"
256

0.2.3 (2015-05-09)

258       · Fix multiple alias imports on the same line (Tiago Costa)
259
260       · More package mappings
261

0.2.2 (2015-05-08)

263       · Add ImportName -> PackageName mapping
264
265       · More tests
266

0.2.1 (2015-05-08)

268       · Fix for TypeError for implicit conversion
269

0.2.0 (2015-05-06)

271       · Add --use-local option
272
273       · Exclude relative imports. (Dongwon Shin)
274
275       · Use "latest_release_id" instead of "release_ids[-1]" (Dongwon Shin)
276

0.1.9 (2015-05-01)

278       · Output tuning (Harri Berglund)
279
280       · Use str.partition() to simplify the logic (cclaus)
281

0.1.8 (2015-04-26)

283       · Fixed problems with local imports (Dongwon Shin)
284
285       · Fixed problems with imports with 'as' (Dongwon Shin)
286
287       · Fix indentation, pep8 Styling. (Michael Borisov)
288
289       · Optimize  imports  and adding missing import for sys module. (Michael
290         Borisov)
291

0.1.7 (2015-04-24)

293       · Add more assertions in tests
294
295       · Add more verbose output
296
297       · Add recursive delete to Makefile clean
298
299       · Update Readme
300

0.1.6 (2015-04-22)

302       · py3 print function
303

0.1.5 (2015-04-22)

305       · Add Readme, Add Examples
306
307       · Add Stdlib into package
308

0.1.1 (2015-04-22)

310       · Fix regex matching for imports
311
312       · Release on Pypi
313

0.1.0 (2015-04-22)

315       · First release on Github.
316
317       · genindex
318
319       · modindex
320
321       · search
322

AUTHOR

324       Vadim Kravcenko
325
327       2020, Vadim Kravcenko
328
329
330
331
3320.4.9                            Jul 29, 2020                       PIPREQS(1)
Impressum