Giter Site home page Giter Site logo

get-py-deps's Introduction

get-py-deps

Test and publish release PyPI Version Python Versions Tested on OS License Last Commit

A Python module to pretty print a table with the dependencies of a Python package with license and url.

Can both be used in your code with:

from get_py_deps import get_py_deps

print(get_py_deps(__name__)) # Can be any installed package name, __name__ contains the name of the current module (self)

Or from the command line as:

$ get-py-deps sphinx

Which will output a table with the licenses and urls which were found as dependencies to that package.

+--------------------------------------+--------------------------------------------------------------+-------------------------------------------+
|               Package                |                           License                            |                    Url                    |
+--------------------------------------+--------------------------------------------------------------+-------------------------------------------+
|           alabaster 0.7.16           |                     (License not found)                      |            (Homepage not found)           |
|           docutils 0.17.1            | public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt) |      http://docutils.sourceforge.net/     |
|           imagesize 1.4.1            |                             MIT                              | https://github.com/shibukawa/imagesize_py |
|             Jinja2 3.1.3             |                         BSD-3-Clause                         |    https://palletsprojects.com/p/jinja/   |
|            packaging 23.2            |                     (License not found)                      |            (Homepage not found)           |
|           requests 2.31.0            |                          Apache 2.0                          |      https://requests.readthedocs.io      |
|        snowballstemmer 2.2.0         |                         BSD-3-Clause                         |  https://github.com/snowballstem/snowball |
|    sphinxcontrib-applehelp 1.0.8     |                     (License not found)                      |            (Homepage not found)           |
|     sphinxcontrib-devhelp 1.0.6      |                     (License not found)                      |            (Homepage not found)           |
|     sphinxcontrib-htmlhelp 2.0.5     |                     (License not found)                      |            (Homepage not found)           |
|      sphinxcontrib-jsmath 1.0.1      |                             BSD                              |           http://sphinx-doc.org/          |
|      sphinxcontrib-qthelp 1.0.7      |                     (License not found)                      |            (Homepage not found)           |
| sphinxcontrib-serializinghtml 1.1.10 |                     (License not found)                      |            (Homepage not found)           |
+--------------------------------------+--------------------------------------------------------------+-------------------------------------------+

Note that the package and its dependencies needs to be installed in the environment where the command is run.

Use case could be that you want to add an option to your own CLI tool to list the dependencies of your tool.

Development

Development is easiest done using the provided dev container. This will ensure that the development environment is consistent across different machines.

The dev container will install all development dependencies and set up the pre-commit hooks used in this project.

To ensure dependency consistency and easy testing, this project uses PDM.

To run all tests and checks, simply run the supplied pdm script from the command line.

$ pdm run all

For a full list of available commands, run:

$ pdm run -l

Pre-requisites

GitHub Action Workflow

The GitHub Action workflow is set up to run the tests and checks on every push, pr and release.

It runs the pdm run all scripts for all supported Python versions on windows, mac and linux.

When creating a release from a tag (x.y.z), the workflow will also build and push the Python package to PyPi.

๐Ÿฆ†

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.