Saturday, April 13, 2013

The pip search command (Python)


By Vasudev Ram

I was checking out the help for Python's pip tool (an installation tool for Python packages), and came across its search option.

The search option of the pip command lets you search PyPI, the Python Package Index.

I tried it out with a couple of searches, for the terms bottle (to get info on more PyPI packages related to 1) the Bottle Python web microframework (which I had blogged about a while ago), and 2) PDF, which is one of my areas of interest.

Here are the results of those two pip searches of PyPI:

c:\Python27\Lib\site-packages>pip -v -v -v search bottle
bottle                    - Fast and simple WSGI-framework for small web-
                            applications.
  INSTALLED: 0.11.6 (latest)
bottlenose                - A Python hook into the Amazon.com Product
                            Advertising API
Bottleneck                - Fast NumPy array functions written in Cython
mimerender                - RESTful HTTP Content Negotiation for Flask,
                            Bottle, web.py and webapp2 (Google App Engine)
bottle-cork               - Authentication/Authorization library for Bottle
pasttle                   - Simple pastebin on top of bottle.
bottle-websocket          - WebSockets for bottle
bottle-hotqueue           - FIFO Queue for Bottle built upon HotQueue
Bottle-DebugToolbar       - A port of the Django Debug Toolbar to Bottle
bottle-haml               - UNKNOWN
macaron                   - Simple object-relational mapper for SQLite3,
                            includes plugin for Bottle web framework
bottle-servefiles         - A reusable app that serves static files for bottle
                            apps
bottle-sqlalchemy         - SQLAlchemy integration for Bottle.
bottle-mongodb            - MongoDB integration for Bottle
flaskle                   - bottle-like utility decorators for flask
bottle-redis              - Redis integration for Bottle.
bottle-pystache           - Bottle Pystache template wrappers
bottle-tornado-websocket  - WebSockets for bottle
BottleRack                - BottleRack Markdown HTML Server
Gluino                    - port of web2py libs to bottle, flask, pyramid,
                            tornado (includes copy of modules from the web2py
                            framework)
bottle-request            - Plugin to give bottle a 'stateless' request object
bottle-sqlite             - SQLite3 integration for Bottle.
bottle-renderer           - Renderer plugin for bottle
bottle-memcache           - Memcache integration for Bottle.
bottle-web2pydal          - Web2py Dal integration for Bottle.
Bottle-SSLify             - Force SSL on any Bottle app.
bottle-werkzeug           - Werkzeug integration for Bottle.
bottle-pycassa            - Bottle plugin for Cassandra/Pycassa
bottle_cql                - CQL integration for Bottle.
bottle-extras             - Meta package to install the bottle plugin
                            collection.
bn                        - Lightweight profiling tool to detect performance
                            BottleNecks in Python code.
bottle-agamemnon          - Agamemnon integration for bottle
bottle-flash              - flash plugin for bottle
bottle-tornadosocket      - WebSockets for bottle
bottle-mysql              - MySQL integration for Bottle.
bottle-pgsql              - PgSQL integration for Bottle

c:\Python27\Lib\site-packages>
c:\Python27\Lib\site-packages>pip -v -v -v search pdf
mwlib.rl                  - generate pdfs from mediawiki markup
zopyx.convert             - A Python interface to XSL-FO libraries (Conversion
                            HTML to PDF, RTF, DOCX, WML and ODT)
slc.publications          - A content type to store and parse pdf publications
pdfminer                  - PDF parser and analyzer
zopyx.convert2            - A Python interface for the conversion of HTML to
                            PDF, RTF, DOCX, WML and ODT) - belongs to
                            zopyx.smartprintng.core
pisa                      - PDF generator using HTML and CSS
collective.pdfpeek        - A Plone 4 product that generates image thumbnail
                            previews of PDF files stored on ATFile based
                            objects.
WeasyPrint                - WeasyPrint converts web documents to PDF.
rst2pdf                   - Convert restructured text to PDF via reportlab.
pdfserenitynow            - Create TIFs and JPGs from crappy PDFs
collective.sendaspdf      - An open source product for Plone to download or
                            email a page seen by the user as a PDF file.
Products.SmartPrintNG     - Produce & Publish for Plone - Conversion of Plone
                            content to PDF, RTS, ODT, DOCX and WML
wc.pageturner             - A Plone product that provides the PDF viewer
                            FlexPaper.
PyX                       - Python package for the generation of PostScript
                            and PDF files
PollyReports              - Band-oriented PDF report generation from database
                            query
relatorio                 - A templating library able to output odt and pdf
                            files
pyPdf                     - PDF toolkit
wildcard.pdfpal           - PDF Thumbnail generation, OCR indexing and extra
                            views integrated with plone.app.async
pdfminer3k                - PDF parser and analyzer
pdfparanoia               - pdf watermark remover library for academic papers
template2pdf              - Renders Django/Jinja2 templates into PDF.
ftw.book                  - Produce books with Plone and export them in a high
                            quality PDF.
collective.pdfjs          - pdf.js integration for Plone
ftw.pdfgenerator          - A library for generating PDF representations of
                            Plone objects with LaTeX.
django-wkhtmltopdf        - Converts html to PDF using
                            http://code.google.com/p/wkhtmltopdf/.
TableFactory              - Easily create HTML, spreadsheet, or PDF tables
                            from common Python data sources
paPyro                    - A PDF report generator written in Python
pdfnup                    - Layout multiple pages per sheet of a PDF document.
pdfdocument               - Wrapper for ReportLab which allows easy creation
                            of PDF documents.
xhtml2pdf                 - PDF generator using HTML and CSS
ServPDF                   - ServPDF is a webbased Microsoft Office to PDF
                            Converter
pdfcrowd                  - A client for Pdfcrowd API.
pdfrecycle                - create a PDF file by composing pages from other
                            PDF files.
metapdf                   - A lightweight PDF library optimized for metadata
                            extraction and insertion
tex                       - Convert LaTeX or TeX source to PDF or DVI, and
                            escape strings for LaTeX.
pdfkit                    - Wkhtmltopdf python wrapper to convert html to pdf
                            using the webkit rendering engine and qt
eea.converter             - SVG, PNG, PDF converters using external tools as
                            ImageMagick
pieberry-library-assistant - A program to download pdf documents from public
                            websites, and catalogue them in BibTeX format
InvoiceGenerator          - Library to generate PDF invoice.
pdfserver                 - Pdfserver is a webservice that offers common PDF
                            operations like joining documents, selecting pages
                            or "n pages on one".
rputils                   - An application for dice rolling and reading PDF
                            files.
diffpy.pdfgui             - GUI for PDF simulation and structure refinement.
pyf.components.consumers.rmlpdfwriter - PyF component RML-Based PDF Writer based
 on
                            Z3C.RML and Genshi
django-xhtml2pdf          - A Django app to generate pdfs from templates
aws.pdfbook               - Download Plone content views as PDF
pdfquery                  - Concise and friendly PDF scraper using JQuery or
                            XPath selectors.
OPAF                      - Open PDF Analysis Framework
TecUtils                  - Various utilities for database and config files
                            use. Text to Pdf converter
Products.PDFtoOCR         - PDFtoOCR does OCR processing on PDF documents. The
                            text from OCR is used in the search results.
Flask-WeasyPrint          - Make PDF in your Flask app with WeasyPrint.
pdfmerge                  - Command-line PDF utility.
ftwbook.graphicblock      - Addon for `ftw.book` providing a graphics block
                            for including PDF documents in the book.
pyf.components.consumers.ooowriter - py3o-powered OpenOffice.org ODT Writer for
PyF
                            Framework with support for rendering (pdf, html,
                            doc, docx, etc) on py3o renderservers.
pyjon.reports             - Pyjon.Reports is a module bridging z3c.rml, genshi
                            and pypdf together to provide a simple mean of
                            creating templated pdf documents in python.
django-pdf                - A Django app for managing and processing PDF
                            documents.
gametex-django-print      - Generate PDFs from GameTeX in Django
collective.pdftransform   - A set of portal transform to change pdf into
                            images
pdftools.pdfposter        - Scale and tile PDF images/pages to print on
                            multiple pages.
django-webodt             - ODF template handler and odt to html, pdf, doc,
                            etc converter
slate                     - Extract text from PDF documents easily.
dinbrief                  - PDF renderer for DIN 5008 and DIN 676 compliant
                            letters and invoices
raptus.princexml          - Provides a simple bridge to create PDFs from HTML
                            views using PrinceXML
wallaby-plugin-pdfgenerator - This package provides a PDF generator for wallaby.

z3c.pdftemplate           - PDF Template
wkhtmltopdf               - Simple python wrapper for wkhtmltopdf
diffpy.pdffit2            - PDFfit2 - real space structure refinement program.
pdfid_PL                  - A Python module to analyze and sanitize PDF files,
                            based on Didier Stevens' PDFiD
pypdflib                  - Pango Cairo based Python PDF Library
pdf2zip                   - pdf conversion utility
pyf.components.consumers.xhtmlpdfwriter - XHTML-Based PDF Writer for PyF Framewo
rk based on
                            PISA and Genshi
pdf-link-checker          - Reports broken hyperlinks in PDF documents
scrape-highlighted        - A script to scrape highlighted text from a pdf
                            [Mac only].
pdfgrid                   - Add a grid on top of all pages of a PDF document.
jag-tipdf                 - Combines plain text and images into a single PDF.
HWFormatter               - Format submitted homework assignments from
                            Blackboard into PDFs
collective.pdfLeadImage   - Automatically creates contentleadimage from pdf
                            cover
pdfcat                    - pdf concatenation tool
prynt                     - Generating HTML/PDF directly from your console.
pdfsplit                  - Split a PDF file or rearrange its pages into a new
                            PDF file.
pdfrw                     - Pure Python PDF file reader/writer library
agenda2pdf                - Simple script which generates a book agenda file
                            in PDF format, ready to be printed or to be loaded
                            on a ebook reader
stapler                   - Manipulate PDF documents from the command line
trml2pdf                  - Tiny RML2PDF is a tool to easily create PDF
                            document without programming. It       can be used
                            as a Python library or as a standalone binary. It
                            converts a RML,       an XML dialect that lets you
                            define the precise appearance of a printed
                            document, to a PDF. You can use your existing
                            tools to generate an input file       that exactly
                            describes the layout of a printed document, and
                            RML2PDF converts       it into PDF. RML is a much
                            more powerfull and flexible alternative to XSL:FO.
                            The executable read a RML file to the standard
                            input and output a PDF file to       the standard
                            output.
wsgitrml2pdf              - wsgitrml2pdf is wsgi middleware to convert trml
                            text to pdf.
fpdf.py                   - Simple PDF generation for Python (FPDF PHP port)
DXF-Converter             - Converts Autocad Files v11 and v12 to pdf
JagPDF                    - A library for generating PDF documents.
pdftools.pdfjoin          - Join PDF documents into a single document.
collective.calameo        - Publish your PDF document in Plone with Calameo
PyPDF2                    - PDF toolkit
PDFTron PDFNet SDK for Python - A top notch PDF library for PDF rendering,
                            conversion, content extraction, etc
cubicweb-pdfexport        - export any page as a pdf document
fpdf                      - Simple PDF generation for Python
pywkher                   - wkhtmltopdf for Python on Heroku
PyBooklet                 - Converts PDFs to booklets
pyFPDF                    - generate pdf on python
origapy                   - A Python module to clean PDF files by disabling
                            active content (javascript, launch, etc), using
                            the Ruby Origami PDF parser.
pdftable                  - pdftable: extract tables from PDF files
django-latex              - Django application to generate latex/pdf files.
ttfpdf                    - TrueType support PDF file Generator
pdf2tiff                  - A PDF to TIFF converter for Mac OS X.
cloudooo.handler.pdf      - Python Package to handler PDF documents
pdfbox                    - JCC wrapper for Apache PDFBox
buzzweb2pdf               - An Open Source tool to convert HTML documentation
                            with an index page into a single PDF.
ServPDF and ServPDF-OO    - Web based Office to PDF Converter Server for
                            Microsoft Office and OpenOffice
genenga                   - Generate Nengajo(Japanese new year card) pdf from
                            address list.

As you can see from the output above, a lot of Python packages were found for those two search terms. In the search for the term "bottle", not all of the packages found were actually related to the Bottle framework, but most were.

The search for "PDF" resulted in many results, some of which I've blogged about in the past, such as pisa/xhtmltopdf, PyPDF, pdfdocument, wkhtml2pdf, and others, and many that I didn't know of before.

So it looks like the pip search command is a useful tool.

As for why I used "pip -v -v -v", see "pip --help" :-)

- Vasudev Ram - Dancing Bison Enterprises

No comments: