Skip to main content

Python parser for LinkHeader

Project description

linkheader_parser

This is a parser for HTTP link header. This package does not cover 100% of the RFC definition of LinkHeaders, but should work in 99% of common cases.

Please report any issue on github.

Install package:

pip install linkheader_parser

Usage:

from linkheader_parser import parse

link_header = = (
    '<https://api.github.com/user/9287/repos?client_id=1&client_secret=2&page=2&per_page=100>; rel="next", <https://api.github.com/user/9287/repos?client_id=1&client_secret=2&page=3&per_page=100>; rel="last"'
)

result = parse(link_header)

Result:


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

linkheader_parser-0.5.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

linkheader_parser-0.5-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

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