Skip to main content

No project description provided

Project description

https://travis-ci.org/PavloKapyshin/paka.breadcrumbs.svg?branch=master

paka.breadcrumbs is a Python library with helpers (currently few data structures) for breadcrumbs navigation building.

Features

  • Python 2.7 and 3.5 are supported

  • PyPy (Python 2.7) is supported

  • does not depend on any web framework

  • does not require use of WSGI

Examples

>>> from paka import breadcrumbs

Create breadcrumbs container:

>>> bcrumbs = breadcrumbs.Bread("Example Site")

Add crumbs for parent (with url_path) and current (without url_path, as there is no need to link to yourself) pages:

>>> bcrumbs.add("Some category", url_path="/some/")
>>> bcrumbs.add("Some page")

Now breadcrumbs container can be iterated over:

>>> [crumb.label for crumb in bcrumbs]
['Example Site', 'Some category', 'Some page']

Installation

Library is available on PyPI, you can use pip for installation:

$ pip install paka.breadcrumbs

Running tests

$ tox

Getting coverage

Collect info:

$ tox -e coverage

View HTML report:

$ sensible-browser .tox/coverage/tmp/cov_html/index.html

Checking code style

Run code checkers:

$ tox -e checks

Getting documentation

Build HTML docs:

$ tox -e docs

View built docs:

$ sensible-browser .tox/docs/tmp/docs_html/index.html

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

paka.breadcrumbs-1.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paka.breadcrumbs-1.2.0-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file paka.breadcrumbs-1.2.0.tar.gz.

File metadata

File hashes

Hashes for paka.breadcrumbs-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5444affe52c75726abf1627704542e0fee2798e00fd0a3a3030ec8b9ce681cc8
MD5 35a0186a6ded31df3b9f4a2916aa3cad
BLAKE2b-256 5de1bf575f94cf6279521a397faa89ce7f3764536a23fbf80cc2a90be8d8f681

See more details on using hashes here.

File details

Details for the file paka.breadcrumbs-1.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for paka.breadcrumbs-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a15e53960212292ef30c8c0e8935ed5459e2391afa9851c6548ea97e4b599ad
MD5 306b343de83647dd4ec9849d121af695
BLAKE2b-256 70c3164684ee4259f37c49b2738072196f689da3febd3d5cf0980b3dc1390ec9

See more details on using hashes here.

Supported by

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