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
Markov Chain Composer

Markov Chain Composer Using Markov Chain to represent relationships between words in song lyrics and then generating new lyrics.. ahem interpretive po

Kylie 85 Dec 09, 2022
A Python software implementation of the Intel 4004 processor

Pyntel4004 A Python software implementation of the Intel 4004 processor. General Information Two pass assembler using the original mnemonics, directiv

alshapton 5 Oct 01, 2022
Automatização completa do site https://blaze.com

PyBlaze Pyblaze possibilita o acesso a api do site blaze utilizando python, retornando os últimos resultados de crashs e doubles. Agora também é possí

Cleiton Leonel 24 Dec 30, 2022
Improve current data preprocessing for FTM's WOB data to analyze Shell and Dutch Governmental contacts.

We're the hackathon leftovers, but we are Too Good To Go ;-). A repo by Lukas Schubotz and Raymon van Dinter. We aim to improve current data preprocessing for FTM's WOB data to analyze Shell and Dutc

ASReview hackathon for Follow the Money 5 Dec 09, 2021
Imitate Moulinette written in Python

Imitate Moulinette written in Python

Pumidol Leelerdsakulvong 2 Jul 26, 2022
Similarity checking of sign languages

Similarity checking of sign languages This repository checks for similarity betw

Tonni Das Jui 1 May 13, 2022
Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

Doom o’clock is a website/project that features a countdown of “when will the earth end” and a greenhouse gas effect emission prediction that’s predicted

shironeko(Hazel) 4 Jan 01, 2022
A scuffed remake of Kahoot... Made by Y9 and Y10 SHSB

A scuffed remake of Kahoot... Made by Y9 and Y10 SHSB

Tobiloba Kujore 3 Oct 28, 2022
📦 A Human's Ultimate Guide to setup.py.

📦 setup.py (for humans) This repo exists to provide an example setup.py file, that can be used to bootstrap your next Python project. It includes som

Navdeep Gill 5k Jan 04, 2023
Openfe - Alchemical free energy calculations for the masses

The Open Free Energy library Alchemical free energy calculations for the masses.

33 Dec 22, 2022
Hands-on machine learning workshop

emb-ntua-workshop This workshop discusses introductory concepts of machine learning and data mining following a hands-on approach using popular tools

ISSEL Soft Eng Team 12 Oct 30, 2022
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
JLC2KICAD_lib is a python script that generate a component library for KiCad from the JLCPCB/easyEDA library.

JLC2KiCad_lib is a python script that generate a component library (schematic, footprint and 3D model) for KiCad from the JLCPCB/easyEDA library. This script requires Python 3.6 or higher.

Nicolas Toussaint 73 Dec 26, 2022
Check bookings for TUM libraries.

TUM Library Checker Only for educational purposes This repository contains a crawler to save bookings for TUM libraries in a CSV file. Sample data fro

Leon Blumenthal 3 Jan 27, 2022
A discord group chat creator just made it because i saw people selling this stuff for like up to 40 bucks

gccreator some discord group chat tools just made it because i saw people selling this stuff for like up to 40 bucks (im currently working on a faster

baum1810 6 Oct 03, 2022
A tool to nowcast quarterly data with monthly indicators: US consumption example

MIDAS_Nowcaster A tool to nowcast quarterly data with monthly indicators: US consumption example Pulls data directly from FRED from a list of codes -

Gene Kindberg-Hanlon 3 Oct 06, 2022
A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

A webdav demo using a virtual filesystem that serves a random status of whether a cat in a box is dead or alive.

Marshall Conover 2 Jan 12, 2022
3x+1 recreated in Python

3x-1 3x+1 recreated in Python If a number is odd it is multiplied by 3 and 1 is added to the product. If a number is even it is divided by 2. These ru

4 Aug 19, 2022
Rufus port to linux, writed on Python3

Rufus-for-Linux Rufus port to linux, writed on Python3 Программа будет иметь тот же интерфейс что и оригинал, и тот же функционал. Программа создается

6 Jan 07, 2022
Cash in on Expressed Barcode Tags (EBTs) from NGS Sequencing Data with Python

Cash in on Expressed Barcode Tags (EBTs) from NGS Sequencing Data with Python Cashier is a tool developed by Russell Durrett for the analysis and extr

3 Sep 11, 2022