Small pip update helpers.

Overview

pipdate

PyPi Version Anaconda Cloud PyPI pyversions GitHub stars PyPi downloads

gh-actions codecov Code style: black

pipdate is a collection of small pip update helpers. The command

pipdate
# or python3.9 -m pipdate

updates all your pip-installed packages. (Only works on Unix.)

There's a Python interface as well that can be used for update notifications. This

import pipdate

pipdate.check("matplotlib", "0.4.5")

will print

This can, for example, be used by package authors to notify users of upgrades of their own packages.

If you guard the check with

import pipdate

if pipdate.needs_checking("matplotlib"):
    print(pipdate.check("matplotlib", "0.4.5"), end="")

then it will be performed at most every k seconds, where k is specified in the config file $HOME/.config/pipdate/config.ini, e.g., once a day

[DEFAULT]
secondsbetweenchecks = 86400

Installation

pipdate is available from the Python Package Index, so simply type

pip install pipdate

Testing

To run the pipdate unit tests, check out this repository and type

pytest

License

This software is published under the GPLv3 license.

Comments
  • pipdate doesn't show update instructions on Mac platforms

    pipdate doesn't show update instructions on Mac platforms

    I'd love to use pipdate, but unfortunately, pipdate seems to only print the run pip install -U package_name message if the target is linux or linux2.

    For macOS, where sys.platform is darwin, it doesn't show update instructions, nor does the API provide any way to do so manually.

    Is this something that you're interested in adding? Thanks!

    opened by jtrivedi 2
  • Support specifying a timeout for network operations

    Support specifying a timeout for network operations

    I think libraries checking for a new version on import should do so either with a timeout or asynchronously. I've just experienced my code not working anymore, because as a concrete example I've tried to import meshio on a bad network and got stuck at this line https://github.com/nschloe/meshio/blob/0142bd97547a30538682c0701cce813dc2a85052/meshio/init.py#L20 .

    Of course it should be optional as it otherwise might constitute a breaking change. I guess testing this functionality is a bit difficult, an easy option would be try making a request to httpbin.org 's /delay/:n endpoint, or no test at all.

    opened by leoschwarz 2
  • On Raspbian, I get You must give at least one requirement to install (see

    On Raspbian, I get You must give at least one requirement to install (see "pip help install")

    I installed pipdated via

    $sudo pip3 install pipdated
    

    Then, running

    $sudo -H pipdate
    

    returns

    You must give at least one requirement to install (see "pip help install")
    

    But your module works fine on my Mac so I'm not really sure what's messing this up.

    opened by gilgameshskytrooper 2
  • marked string containing an umlaut as Unicode

    marked string containing an umlaut as Unicode

    I confess to finding working with Unicode a bit confusing, so this may not be the correct fix, but to successfully 'pip install' pygmsh which depends on this package, I had to prepend the u to the string to avoid the UnicodeDecodeError.

    opened by gdmcbain 2
  • pipdate 0.5.5 doesnt work

    pipdate 0.5.5 doesnt work

    i updated pipdate, but it always gives me ModuleNotFound errors. while pipdate 0.5.3 works perfectly, 0.5.5 doesnt. im using windows 10, python 3.9.6 x64bit

    opened by 0lm 1
  • Only update pip packages for the version of Python pipdate was installed to.

    Only update pip packages for the version of Python pipdate was installed to.

    Hi!

    I'm using linux-mint and am running 4 different versions of python on it. To not mess with the default packages I use the command Python3.7 -m pip install pipdate to install pipdate only for Python3.7 (and this is performed correctly as I see pipdate when I run python3.7 -m pip freeze.

    The issue is that I can not run pipdate using this approach, I have to run it as just pipdate in the terminal. It would be really helpful if I could run it in each instance of pip to update them seperately, such as python3.8 -m pipdate and python3.6 -m pipdate.

    opened by Fooughhy 1
  • Can't import pipdated (decoding error on author's name)

    Can't import pipdated (decoding error on author's name)

    Hello

    (I'm quite new to github, so it may not be the exact place to post this (sorry in that case...))

    When importing pipdated, I got an error due to encoding system : import pipdated

    Traceback (most recent call last):
      File "<pyshell#1>", line 1, in <module>
        import pipdated
      File "C:\Users\thomas.grandjean\Desktop\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\pipdated\__init__.py", line 15, in <module>
        from pipdated.helpers import *
      File "C:\Users\thomas.grandjean\Desktop\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\pipdated\helpers.py", line 34, in <module>
        _log_dir = appdirs.user_log_dir('pipdated', 'Nico Schlömer')
      File "C:\Users\thomas.grandjean\Desktop\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\appdirs.py", line 351, in user_log_dir
        path = user_data_dir(appname, appauthor, version)
      File "C:\Users\thomas.grandjean\Desktop\WinPython-32bit-2.7.10.3\python-2.7.10\lib\site-packages\appdirs.py", line 84, in user_data_dir
        path = os.path.join(path, appauthor, appname)
      File "C:\Users\thomas.grandjean\Desktop\WinPython-32bit-2.7.10.3\python-2.7.10\lib\ntpath.py", line 85, in join
        result_path = result_path + p_path
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
    

    I had to replace 'Nico Schlömer' by u'Nico Schlömer' in the helper.py file. Regards tgrandje

    opened by tgrandje 1
  • bug(platform): Windows support

    bug(platform): Windows support

    1. Summary

    pipdate doesn't support my Windows 10. In Scripts folder I get file pipdate, not pipdate.exe.

    Your setup.py part:

    'Operating System :: OS Independent',
    

    I think, that Windows must be support.

    2. Environment

    • Windows 10 Enterprise LTSB 64-bit EN,
    • Python 3.6.4,
    • pip 9.0.1,
    • pip-show 0.2.2.

    3. Steps to reproduce

    D:\Kristinita>pip install pipdate
    Collecting pipdate
      Using cached pipdate-0.2.2-py2.py3-none-any.whl
    Requirement already satisfied: requests in c:\python36\lib\site-packages (from pipdate)
    Requirement already satisfied: appdirs in c:\python36\lib\site-packages (from pipdate)
    Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\python36\lib\site-packages (from requests->pipdate)
    Requirement already satisfied: idna<2.7,>=2.5 in c:\python36\lib\site-packages (from requests->pipdate)
    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python36\lib\site-packages (from requests->pipdate)
    Requirement already satisfied: certifi>=2017.4.17 in c:\python36\lib\site-packages (from requests->pipdate)
    Installing collected packages: pipdate
    Successfully installed pipdate-0.2.2
    
    D:\Kristinita>pipdate
    'pipdate' is not recognized as an internal or external command,
    operable program or batch file.
    

    I move to C:\Python36\Scripts folder → pipdate and pipdate3 haven't Windows exe extension.

    pipdate

    4. Possible solution

    Possible, it would be nice, if you add console_scripts parameter to your setup.py.

    Thanks.

    opened by Kristinita 7
  • Support private PyPi servers

    Support private PyPi servers

    Great module but it's hardcoded to PyPi. This means it doesn't respect the links and link-url settings in ~/.config/pip/pip.conf.

    It would be nice to have this feature!

    opened by brettswift 0
Releases(0.5.6)
Owner
Nico Schlömer
Mathematics, numerical analysis, scientific computing, Python. Always interested in new problems.
Nico Schlömer
Team Hash Brown Science4Cast Submission

Team Hash Brown Science4Cast Submission This code reproduces Team Hash Brown's (@princengoc, @Xieyangxinyu) best submission (ee5a) for the competition

3 Feb 02, 2022
A small program to vote for Councilors at 42 Heilbronn.

This Docker container is build to run on server an provide an easy to use interface for every student to vote for their councillors. To run docker on

Kevin Hirsig 2 Jan 17, 2022
An html wrapper for python

MessySoup What is it? MessySoup is a python wrapper for html elements. While still a ways away, the main goal is to be able to build a wesbite straigh

4 Jan 05, 2022
Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM

Serverless-capture-lambda-payload-demo Serverless demo showing users how they can capture (and obfuscate) their Lambda payloads in Datadog APM This wi

Datadog, Inc. 1 Nov 02, 2021
A calculator developed in Python.

Calculadora Uma simples calculadora... ( + − × ÷ ) 💻 Situação do projeto: Projeto finalizado ✔️ 🛠 Tecnologias: Python Tkinter (GUI) ⚙️ Pré-requisito

Arthur V.B.S. 1 Jan 27, 2022
A program that analyzes data from inertia measurement units installeed in aircraft and generates g-exceedance curves

A program that analyzes data from inertia measurement units installeed in aircraft and generates g-exceedance curves

Pooya 1 Nov 23, 2021
Wordle is fun, so let's ruin it with computers.

ruin-wordle Wordle is fun, so let's ruin it with computers. Metrics This repository assesses two metrics about each algorithm: Success: how many of th

Charles Tapley Hoyt 11 Feb 11, 2022
Pre-crisis Risk Management for Personal Finance

Антикризисный риск-менеджмент личных финансов Риск-менеджмент личных финансов условиях санкций и/или финансового кризиса: делаем сегодня все, чтобы за

Dmitry Petukhov 593 Jan 09, 2023
Python 100daysofcode

#python #100daysofcode Python is a simple, general purpose ,high level & object-oriented programming language even it's is interpreted scripting langu

Tara 1 Feb 10, 2022
[draft] tools for schnetpack

schnetkit some tooling for schnetpack EXPERIMENTAL/IN DEVELOPMENT DO NOT USE This is an early draft of some infrastructure built around schnetpack. In

Marcel 1 Nov 08, 2021
Graveyard is an attempt at open-source reimplementation of DraciDoupe.cz

Graveyard: Place for Dead (and Undead) Graveyard is an attempt at open-source reimplementation of DraciDoupe.cz (referred to as DDCZ in this text). De

DraciDoupe.cz 5 Mar 17, 2022
LinuxHelper - A collection of utilities for non-technical Linux users accessible via a GUI

Linux Helper A collection of utilities for non-technical Linux users accessible via a GUI This app is still in very early development, expect bugs and

Seth 7 Oct 03, 2022
The learning agent learns firstly approaching to the football and then kicking the football to the target position

Football Court This project utilized Pytorch and Tensorflow so that the learning agent learns firstly approaching to the football and then kicking the

1 Nov 19, 2021
Python package for handling and analyzing PSRFITS files

PyPulse A pure-Python package for handling and analyzing PSRFITS files. Read the documentation here. This is an alternate code base from PSRCHIVE. Req

Michael Lam 15 Nov 30, 2022
Wordless - the #1 app for helping you cheat at Wordle, which is sure to make you popular at parties

Wordless Wordless is the #1 app for helping you cheat at Wordle, which is sure t

James Kirk 7 Feb 04, 2022
Module for working with the site dnevnik.ru with python

dnevnikru Module for working with the site dnevnik.ru with python Dnevnik object accepts login and password from the dnevnik.ru account Methods: homew

Aleksandr 21 Nov 21, 2022
mypy plugin for PynamoDB

pynamodb-mypy A plugin for mypy which gives it deeper understanding of PynamoDB (beyond what's possible through type stubs). Usage Add it to the plugi

1 Oct 21, 2022
This program goes thru reddit, finds the most mentioned tickers and uses Vader SentimentIntensityAnalyzer to calculate the ticker compound value.

This program goes thru reddit, finds the most mentioned tickers and uses Vader SentimentIntensityAnalyzer to calculate the ticker compound value.

195 Dec 13, 2022
Excel cell checker with python

excel-cell-checker Description This tool checks a given .xlsx file has the struc

Paul Aumann 1 Jan 04, 2022
A visidata plugin for parsing f5 ltm/gtm/audit logs

F5 Log Visidata Plugin This plugin supports the default log format for: /var/log/ltm* /var/log/gtm* /var/log/apm* /var/log/audit* It extracts common l

James Deucker 1 Jan 06, 2022