README.rst 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .. image:: https://img.shields.io/pypi/v/backports.functools_lru_cache.svg
  2. :target: https://pypi.org/project/backports.functools_lru_cache
  3. .. image:: https://img.shields.io/pypi/pyversions/backports.functools_lru_cache.svg
  4. .. image:: https://github.com/jaraco/backports.functools_lru_cache/workflows/tests/badge.svg
  5. :target: https://github.com/jaraco/backports.functools_lru_cache/actions?query=workflow%3A%22tests%22
  6. :alt: tests
  7. .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
  8. :target: https://github.com/astral-sh/ruff
  9. :alt: Ruff
  10. .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
  11. :target: https://github.com/psf/black
  12. :alt: Code style: Black
  13. .. image:: https://readthedocs.org/projects/backportsfunctools_lru_cache/badge/?version=latest
  14. :target: https://backportsfunctools_lru_cache.readthedocs.io/en/latest/?badge=latest
  15. .. image:: https://img.shields.io/badge/skeleton-2023-informational
  16. :target: https://blog.jaraco.com/skeleton
  17. .. image:: https://tidelift.com/badges/package/pypi/backports.functools_lru_cache
  18. :target: https://tidelift.com/subscription/pkg/pypi-backports.functools_lru_cache?utm_source=pypi-backports.functools_lru_cache&utm_medium=readme
  19. Backport of functools.lru_cache from Python 3.3 as published at `ActiveState
  20. <http://code.activestate.com/recipes/578078/>`_.
  21. Usage
  22. =====
  23. Consider using this technique for importing the 'lru_cache' function::
  24. try:
  25. from functools import lru_cache
  26. except ImportError:
  27. from backports.functools_lru_cache import lru_cache
  28. For Enterprise
  29. ==============
  30. Available as part of the Tidelift Subscription.
  31. This project and the maintainers of thousands of other packages are working with Tidelift to deliver one enterprise subscription that covers all of the open source you use.
  32. `Learn more <https://tidelift.com/subscription/pkg/pypi-backports.functools_lru_cache?utm_source=pypi-backports.functools_lru_cache&utm_medium=referral&utm_campaign=github>`_.