A Python dependency resolver

Overview

python-resolver

A Python dependency resolver.

Issues

  • Only supports wheels (no sdists!)

Usage

Python library

import packaging.requirements
import resolvelib
import resolver


resolver = resolvelib.Resolver(
    resolver.Provider(),
    resolvelib.BaseReporter(),
)
resolver.resolve({
    packaging.requirements.Requirement('trampolim==0.0.2'),
})

Resolver CLI

$ python -m resolver build
--- Pinned Candidates ---
build: build 0.3.1.post1
pep517: pep517 0.10.0
toml: toml 0.10.2
packaging: packaging 20.9
pyparsing: pyparsing 2.4.7

--- Dependency Graph ---
pep517 -> toml
(root) -> build
build -> pep517, toml, packaging
pyparsing ->
toml ->
packaging -> pyparsing

mindeps CLI

resolver.mindeps will resolve the dependency tree for the minimum supported version. This is useful when you want to for eg. test your software against the minimum version of the dependencies that it claims to support.

It can work on projects directly, or on requirement strings, like the normal CLI. If no argument is provided, it will try to resolve the dependencies for the current project. If arguments are provided, it will treat them as requirement strings and resolve them instead, like the normal CLI. Unlike the normal CLI, the output will be a list of requirement strings that pins the dependency versions.

For resolving the current project, the python-resolver[mindeps] extra needs to be installed.

$ python -m resolver.mindeps
resolvelib==0.7.0
importlib-metadata==3.2.0
mousebender==2.0.0
zipp==0.5.0
attrs==19.3.0
packaging==20.3
pyparsing==2.0.3
six==1.5.0
$ python -m resolver.mindeps build==0.3.0
build==0.3.0
pep517==0.9.1
toml==0.9.6
packaging==14.0
You might also like...
Lavrigon - A Python Webservice to check the status of any given local service via a REST call

lavrigon A Python Webservice to check the status of any given local service via

Pygitstats - a package that allows you to use the GitHub GraphQL API with ease in your Python programs

Pygitstats - a package that allows you to use the GitHub GraphQL API with ease in your Python programs

Graphql-codegen library - a pure python implementation

turms DEVELOPMENT Inspiration Turms is a pure python implementation of the awesome graphql-codegen library, following a simliar extensible design. It

MGE-GraphQL is a Python library for building GraphQL mutations fast and easily

MGE-GraphQL Introduction MGE-GraphQL is a Python library for building GraphQL mutations fast and easily. Data Validations: A similar data validation w

Dependency Injector is a dependency injection framework for Python.
Dependency Injector is a dependency injection framework for Python.

What is Dependency Injector? Dependency Injector is a dependency injection framework for Python. It helps implementing the dependency injection princi

Dependency Combobulator is an Open-Source, modular and extensible framework to detect and prevent dependency confusion leakage and potential attacks.

Dependency Combobulator Dependency Combobulator is an Open-Source, modular and extensible framework to detect and prevent dependency confusion leakage

DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE
DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE

DepFine DepFine Is a tool to find the unregistered dependency based on dependency confusion valunerablility and lead to RCE Installation: You Can inst

✨ Un DNS Resolver totalement fait en Python par moi, et en français
✨ Un DNS Resolver totalement fait en Python par moi, et en français

DNS Resolver ❗ Un DNS Resolver totalement fait en Python par moi, et en français. 🔮 Grâce a une adresse (url) vous pourrez avoir l'ip ainsi que le DN

CoWIN Vaccination slot booking telegram bot with auto captcha resolver & alerting feature.Now, never miss a slot.
CoWIN Vaccination slot booking telegram bot with auto captcha resolver & alerting feature.Now, never miss a slot.

COWIN VACCINATION SLOT AUTO BOOKING (Bot with captcha solving & alerting capabilities. Never miss the vaccine slot.) June-10-2021/ 0030 hrs: 23 succes

A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)
A high-performance DNS stub resolver for bulk lookups and reconnaissance (subdomain enumeration)

MassDNS A high-performance DNS stub resolver MassDNS is a simple high-performance DNS stub resolver targeting those who seek to resolve a massive amou

Código que Utiliza Programação Dinâmica para resolver o problema da Moeda

Programação Dinâmica: Modelo baseado em recursão Utiliza a técnica de Memorização Não pode ser aplicada quando existe dependência entre as respostas G

Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in.
Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in.

Luigi is a Python (3.6, 3.7 tested) package that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow managemen

Python bindings to the dutch NLP tool Frog (pos tagger, lemmatiser, NER tagger, morphological analysis, shallow parser, dependency parser)

Frog for Python This is a Python binding to the Natural Language Processing suite Frog. Frog is intended for Dutch and performs part-of-speech tagging

Python dependency management and packaging made easy.
Python dependency management and packaging made easy.

Poetry: Dependency Management for Python Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right sta

A lightweight, dependency-free Python library (and command-line utility) for downloading YouTube Videos.

24 July 2020 Actively soliciting contributers! Ping @ronncc if you would like to help out! pytube pytube is a very serious, lightweight, dependency-fr

Python dependency management and packaging made easy.
Python dependency management and packaging made easy.

Poetry: Dependency Management for Python Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right sta

An installation and dependency system for Python
An installation and dependency system for Python

Pyflow Simple is better than complex - The Zen of Python Pyflow streamlines working with Python projects and files. It's an easy-to-use CLI app with a

pip-run - dynamic dependency loader for Python

pip-run provides on-demand temporary package installation for a single interpreter run. It replaces this series of commands (or their Windows equivale

📦 Autowiring dependency injection container for python 3

Lagom - Dependency injection container What Lagom is a dependency injection container designed to give you "just enough" help with building your depen

Comments
  • Trouble installing the `mindeps` tool

    Trouble installing the `mindeps` tool

    First of all, I'm not a Python guy, so sorry if I'm asking stupid questions 😉 I'm looking at using this tool in the ORT Analyzer to list a Python project's (no matter whether defined by a setup.py or a requirements.txt) transitive dependencies and their metadata without actually building the Python project.

    The mindeps CLI seems to be suitable for that, but I'm having trouble installing it. I tried this on Ubuntu 18.04 LTS with both Python 2.7 and Python 3.6, but in both cases I'm getting resolver 0.2.1 does not provide the extra 'mindeps':

    $ pip install resolver[mindeps]
    WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
    Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
    To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Defaulting to user installation because normal site-packages is not writeable
    Requirement already satisfied: resolver[mindeps] in /home/user/.local/lib/python2.7/site-packages (0.2.1)
      WARNING: resolver 0.2.1 does not provide the extra 'mindeps'
    
    $ pip3 install resolver[mindeps]
    Collecting resolver[mindeps]
      resolver 0.2.1 does not provide the extra 'mindeps'
    Installing collected packages: resolver
    Successfully installed resolver-0.2.1
    

    Any hints how to install the mindeps CLI porperly?

    opened by sschuberth 0
  • Move mindeps generation logic to separate function

    Move mindeps generation logic to separate function

    from resolver.mindeps import get_min_deps
    
    requirements = ['importlib-metadata>=3.2.0', "pytest>=4 ; extra == 'test'", "pytest-cov>=2 ; extra == 'test'"]
    min_deps = get_min_deps(requirements)
    
    print(min_deps)
    
    opened by Shivansh-007 0
Owner
Filipe Laíns
packaging for archlinux, breaking hardware and writing drivers
Filipe Laíns
GraphQL framework for Python

Graphene ?? Join the community on Slack We are looking for contributors! Please check the ROADMAP to see how you can help ❤️ The below readme is the d

GraphQL Python 7.5k Jan 1, 2023
🏆 A ranked list of awesome python libraries for web development. Updated weekly.

Best-of Web Development with Python ?? A ranked list of awesome python libraries for web development. Updated weekly. This curated list contains 540 a

Machine Learning Tooling 1.8k Jan 4, 2023
GraphQL framework for Python

Graphene ?? Join the community on Slack We are looking for contributors! Please check the ROADMAP to see how you can help ❤️ The below readme is the d

GraphQL Python 7.5k Jan 1, 2023
A Python 3.6+ port of the GraphQL.js reference implementation of GraphQL.

GraphQL-core 3 GraphQL-core 3 is a Python 3.6+ port of GraphQL.js, the JavaScript reference implementation for GraphQL, a query language for APIs crea

GraphQL Python 458 Dec 13, 2022
Ariadne is a Python library for implementing GraphQL servers using schema-first approach.

Ariadne Ariadne is a Python library for implementing GraphQL servers. Schema-first: Ariadne enables Python developers to use schema-first approach to

Mirumee Labs 1.9k Jan 1, 2023
GraphQL Engine built with Python 3.6+ / asyncio

Tartiflette is a GraphQL Server implementation built with Python 3.6+. Summary Motivation Status Usage Installation Installation dependencies Tartifle

tartiflette 839 Dec 31, 2022
A new GraphQL library for Python 🍓

Strawberry GraphQL Python GraphQL library based on dataclasses Installation ( Quick Start ) The quick start method provides a server and CLI to get go

Strawberry GraphQL 2.8k Jan 1, 2023
A python graphql api, which serves ECB currency rates from last 90 days.

Exchange Rate Api using GraphQL Get Code git pull https://github.com/alaturqua/exchangerate-graphql.git Create .env file with following content and s

Isa 1 Nov 4, 2021
This is a simple Python that will parse instanceStats GraphQL Query into a CSV

GraphQL Python Labs - by Gabs the CSE Table of Contents About The Project Getting Started Prerequisites Installation and Usage Roadmap Contributing Li

Gabriel (Gabs) Cerioni 1 Oct 27, 2021
Python script to like all posts from a selected Anilist profile

AniLiker: A python autoliker What's the point of this project? This project was a way to learn GraphQL, and also create a project that I've been inter

Iván Pérez 9 Nov 25, 2022