Git Product home page Git Product logo

reduce-requeriments-txt's Introduction

Reduce-Requirements

This module provides a simple way to reduce the number of requirements listed in a Python project's requirements.txt file when using PIP. This can be a useful tool for identifying the main requirements of our Python project that call upon other dependencies.

Installation

First, it's necessary to install the library pipdeptree in the project that needs to reduce its requirements.txt file. This module extracts all dependencies of the project and generates a tree structure to visualize them.

pip install pipdeptree

This package generate a tree of dependencies with the following command:

pipdeptree -fl > tree.txt

The tree.txt file contains a dependencies tree:

root1
 child1_1
 child1_2
  subchild1_2_1
  subchild1_2_2
 child1_3
root2
 child2_1

The object is to get all the root dependencies instead any child dependency.

Usage

Execute the following command:

python reduce-req.py path/to/project/

This command creates a requirements.txt file with the root dependencies.

reduce-requeriments-txt's People

Contributors

senquevila avatar

Watchers

 avatar

reduce-requeriments-txt's Issues

Simplification of usage

Avoid using subprocess. The user should to install pipdeptree and execute the command manually instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.