No project description provided
Project description
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.1.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for paka.breadcrumbs-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3cc7b0621f5286559dd93ee07ec4e926dce20a5940948bc9afc940b40ecb1d5 |
|
MD5 | 658f3d50650e55e2d487008c7fa6d59f |
|
BLAKE2b-256 | 88f3799a578f97dcac5d1caae18d6491fc591423d50fcc4f0b21018158dfc9b3 |