All Projects → hugovk → pypi-tools

hugovk / pypi-tools

Licence: other
Command-line Python scripts to do things with PyPI

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to pypi-tools

Finviz
Unofficial API for finviz.com
Stars: ✭ 493 (+2638.89%)
Mutual labels:  chart, csv, pypi
fb-page-chat-download
Python script to download messages from a Facebook page to a CSV file
Stars: ✭ 51 (+183.33%)
Mutual labels:  csv, python-script
Plotjuggler
The Time Series Visualization Tool that you deserve.
Stars: ✭ 2,620 (+14455.56%)
Mutual labels:  chart, csv
Youtubetospotify
A Python script to fetch tracks of music channels on Youtube, find them on Spotify and add them to a playlist
Stars: ✭ 33 (+83.33%)
Mutual labels:  csv, python-script
Django Rest Pandas
📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)
Stars: ✭ 1,030 (+5622.22%)
Mutual labels:  chart, csv
Clip
Create charts from the command line
Stars: ✭ 5,111 (+28294.44%)
Mutual labels:  chart, csv
Ssl Checker
Python script that collects SSL/TLS information from hosts
Stars: ✭ 94 (+422.22%)
Mutual labels:  csv, python-script
Just Dashboard
📊 📋 Dashboards using YAML or JSON files
Stars: ✭ 1,511 (+8294.44%)
Mutual labels:  chart, csv
python-package-template
Easy to use template for great PyPi packages
Stars: ✭ 19 (+5.56%)
Mutual labels:  pypi, python-script
libcsv
libcsv is a small, simple and fast CSV library written in pure ANSI C89 that can read and write CSV data. | libcsv是用纯ANSI C89编写的小型、简单、快速的CSV库,支持读写CSV数据.
Stars: ✭ 23 (+27.78%)
Mutual labels:  csv
spyql
Query data on the command line with SQL-like SELECTs powered by Python expressions
Stars: ✭ 694 (+3755.56%)
Mutual labels:  csv
badsv
The official BaDSV specification and CLI. Ascend from your puny DSV files!
Stars: ✭ 50 (+177.78%)
Mutual labels:  csv
molenc
MolEnc: a molecular encoder using rdkit and OCaml.
Stars: ✭ 14 (-22.22%)
Mutual labels:  python-script
stock-market-scraper
Scraps historical stock market data from Yahoo Finance (https://finance.yahoo.com/)
Stars: ✭ 110 (+511.11%)
Mutual labels:  csv
Workout
A simple iOS app that accesses Health data to export workout data to CSV for any use.
Stars: ✭ 39 (+116.67%)
Mutual labels:  csv
heroku-flask-template
A simple, fast and easy-to-deploy Heroku ready flask web app template written in Python.
Stars: ✭ 26 (+44.44%)
Mutual labels:  python-script
node-emails-from-csv
A simple NodeJS aplication that helps sending emails for events. Uses CSV files for target users.
Stars: ✭ 18 (+0%)
Mutual labels:  csv
Mr.Holmes
🔍 A Complete Osint Tool
Stars: ✭ 307 (+1605.56%)
Mutual labels:  python-script
m3u8-downloader
Download the ts files according to the given m3u8 file.
Stars: ✭ 21 (+16.67%)
Mutual labels:  python-script
Rhythm-CB-Scripts
Collection of scripts for use with Carbon Black Cb Response API
Stars: ✭ 14 (-22.22%)
Mutual labels:  csv

pypi-tools

Test Python: 3.7+ Code style: Black

Command-line Python scripts to do things with the Python Package Index (PyPI).

pypi-trends.py

pypi-trends.py is a wrapper around pypinfo and pypistats to fetch all monthly downloads from the PyPI database on Google BigQuery and save them as JSON files.

For the examples below, data was downloaded over many days as getting all months uses up a lot of free BigQuery quota.

jsons2csv.py

jsons2csv.py converts the JSON files into a single CSV file for chart-wrangling in a spreadsheet, and can generate a chart using Matplotlib. Once an image exists, it can be re-generated with make -j4.

Examples

Here the pip installs for all packages from the Python Package Index (PyPI), from January 2016 onwards:

urllib3

HTTP client

six

Python 2 and 3 compatibility library

setuptools

Build system

See more charts here.

See also

source-finder.py

Given a PyPI package, source_finder.py looks for the source repository in its metadata.

$ python source_finder.py six
https://github.com/benjaminp/six
$ python source_finder.py urllib3
None

It caches the JSON metadata downloaded from PyPI in a temporary directory, use the --verbose option to see where. The cache files will be deleted the next month.

$ python source_finder.py s3transfer --verbose
API URL: https://pypi.org/pypi/s3transfer/json
Cache file: /Users/hugo/Library/Caches/source-finder/2019-10-https-pypi-org-pypi-s3transfer-json.json
Cache file exists
project_urls    Homepage        https://github.com/boto/s3transfer
Success!
project_urls    Homepage        https://github.com/boto/s3transfer
Success!
https://github.com/boto/s3transfer

top_repos.py

This will look for the source repo for the most-downloaded packages, using a JSON file from Top PyPI Packages, and save them to data/top-repos.json.

First, fetch fresh copy of the top packages:

$ wget https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json -O  data/top-pypi-packages.json

--2019-10-14 18:12:45--  https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.min.json
Resolving hugovk.github.io (hugovk.github.io)... 185.199.110.153, 185.199.108.153, 185.199.111.153, ...
Connecting to hugovk.github.io (hugovk.github.io)|185.199.110.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 250885 (245K) [application/json]
Saving to: ‘data/top-pypi-packages.json’

data/top-pypi-packages.json      100%[========================================================>] 245.00K  --.-KB/s    in 0.02s

2019-10-14 18:12:45 (14.7 MB/s) - ‘data/top-pypi-packages.json’ saved [250885/250885]

Check the first 10 packages:

$ python top_repos.py -n 10
Load data/top-repos.json...
Load top-pypi-packages.json...
Already done: 0
Find new repos...
1 urllib3
2 six       https://github.com/benjaminp/six
3 requests
4 botocore  https://github.com/boto/botocore
5 python-dateutil
6 certifi
7 s3transfer        https://github.com/boto/s3transfer
8 pip
9 idna      https://github.com/kjd/idna
10 docutils
Old repos: 0
New repos: 4
Not found: 6
Save data/top-repos.json...

When running again:

  • if a package already has a repo, it's not checked again in case it's changed
  • if a package doesn't have a repo, it will be checked

Currently, it finds 3,951 repos for the top 5,000 packages.

I'm not planning on automating this, but can run it from time to time to update it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].