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']

And value you can put into <title></title> may be constructed (it is actually an instance of markupsafe.Markup):

>>> print(bcrumbs.get_title("<-"))
Some page &lt;- Some category &lt;- Example Site

Installation

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

$ pip install paka.breadcrumbs

Getting documentation

Build HTML docs:

$ tox -e docs

View built docs:

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

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

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.3.2.tar.gz (4.4 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.3.2-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for paka.breadcrumbs-1.3.2.tar.gz
Algorithm Hash digest
SHA256 b894b7e47d85bc3d8a9f7ec484df27ed0445faed41f4d6836516f5026d7908b0
MD5 a92015881a0871cfe97b868a90414a9d
BLAKE2b-256 5c3b2be68560f2034b3f5eab72b03107c0d6fbf83cc0e9be6ec6aa4a05655b40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for paka.breadcrumbs-1.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7038eef237a7eed5f23a05bc96b75a428e8ff07e86be6c28624f2f2396eb6344
MD5 43fe4e9ecd642d7be0e5903a1415a9fd
BLAKE2b-256 18a3aa644daf7feb080af8b33879b5798c3a3eb838c905a9d94a2ec022e3352b

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