Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xq

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xq

Like jq but for XML and XPath.

  • 0.0.4
  • PyPI
  • Socket score

Maintainers
1

xq

Apply XPath expressions to XML, like jq does for JSONPath and JSON.

Installation

Install with pip::

pip install xq

Or download the repo and install via setuptools::

python setup.py install

Usage

Extract download URLs from an RSS feed::

http get 'http://br-rss.jeffbr13.net/rss/channels/1/' | xq '//item/enclosure/@url'

Extract all links from an HTML page footer::

http get 'http://br-rss.jeffbr13.net/ | xq '//footer//a/@href'

Test

Run unittest in the root directory to autodetect and run tests::

python -m unittest

Build

Increment xq.VERSION and run the following two commands to create a source distribution <https://packaging.python.org/tutorials/distributing-packages/#source-distributions>, create a universal wheel <https://packaging.python.org/tutorials/distributing-packages/#universal-wheels>, and upload to PyPI <https://packaging.python.org/tutorials/distributing-packages/#upload-your-distributions>_ ::

python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*

See Also

  • jq <https://github.com/stedolan/jq>_
  • hq <https://github.com/rbwinslow/hq>_

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc