Skip to main content

Like jq but for XML and XPath.

Project description

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, create a universal wheel, and upload to PyPI

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

See Also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xq-0.0.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distributions

xq-0.0.4-py3.6.egg (9.9 kB view details)

Uploaded Source

xq-0.0.4-py2.py3-none-any.whl (6.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xq-0.0.4.tar.gz.

File metadata

  • Download URL: xq-0.0.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xq-0.0.4.tar.gz
Algorithm Hash digest
SHA256 28574d5c614d4012a8ad0e08b1c53712f4d69c9f1d8a6c7aa3134262edd82977
MD5 91cde23e6ce09016ed58c3839378eac7
BLAKE2b-256 ca9d1b464621f4a18c997579e0cc3ad0ba701c0b917702529a67deeaedade4bf

See more details on using hashes here.

File details

Details for the file xq-0.0.4-py3.6.egg.

File metadata

  • Download URL: xq-0.0.4-py3.6.egg
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xq-0.0.4-py3.6.egg
Algorithm Hash digest
SHA256 0f553244cdc1e7de9c7af5e707c47cb05a943180a262c7bee0a843f6d54e5b8e
MD5 1bec40cf2b22fcfbe2358ea93d6128d6
BLAKE2b-256 1ae06989fc30f3524dfceb6092b470790223c477f06f1c69785921f0b7a0c775

See more details on using hashes here.

File details

Details for the file xq-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for xq-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f1fc71de12ca0608321458269bf007b24eff61efe74382a644ab7cb587a26fd6
MD5 00ae02650f59ecbd5a347f0dd2448fe6
BLAKE2b-256 5cc8c039729a023207a973a0181f41debf07ee03ad3e167693b1900445ef4f05

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page