__init__.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # -*- coding: utf-8 -*-
  2. # Copyright 2018 Joshua Bronson. All Rights Reserved.
  3. #
  4. # This Source Code Form is subject to the terms of the Mozilla Public
  5. # License, v. 2.0. If a copy of the MPL was not distributed with this
  6. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  7. #==============================================================================
  8. # * Welcome to the bidict source code *
  9. #==============================================================================
  10. # Doing a code review? You'll find a "Code review nav" comment like the one
  11. # below at the top and bottom of the most important source files. This provides
  12. # a suggested initial path through the source when reviewing.
  13. #
  14. # Note: If you aren't reading this on https://github.com/jab/bidict, you may be
  15. # viewing an outdated version of the code. Please head to GitHub to review the
  16. # latest version, which contains important improvements over older versions.
  17. #
  18. # Thank you for reading and for any feedback you provide.
  19. # * Code review nav *
  20. #==============================================================================
  21. # Current: __init__.py Next: _abc.py →
  22. #==============================================================================
  23. """
  24. Efficient, Pythonic bidirectional map implementation and related functionality.
  25. .. note::
  26. If you are reading this elsewhere,
  27. please see https://bidict.readthedocs.io for the most up-to-date documentation,
  28. and https://github.com/jab/bidict for the most up-to-date code.
  29. .. :copyright: (c) 2018 Joshua Bronson.
  30. .. :license: MPLv2. See LICENSE for details.
  31. """
  32. # This __init__.py only collects functionality implemented in the rest of the
  33. # source and exports it under the `bidict` module namespace (via `__all__`).
  34. from ._abc import BidirectionalMapping
  35. from ._base import BidictBase
  36. from ._bidict import bidict
  37. from ._dup import DuplicationPolicy, IGNORE, OVERWRITE, RAISE
  38. from ._exc import (
  39. BidictException, DuplicationError,
  40. KeyDuplicationError, ValueDuplicationError, KeyAndValueDuplicationError)
  41. from ._util import inverted
  42. from ._frozenbidict import frozenbidict
  43. from ._frozenordered import FrozenOrderedBidict
  44. from ._named import namedbidict
  45. from ._orderedbase import OrderedBidictBase
  46. from ._orderedbidict import OrderedBidict
  47. from .metadata import (
  48. __author__, __maintainer__, __copyright__, __email__, __credits__, __url__,
  49. __license__, __status__, __description__, __keywords__, __version__, __version_info__)
  50. __all__ = (
  51. '__author__',
  52. '__maintainer__',
  53. '__copyright__',
  54. '__email__',
  55. '__credits__',
  56. '__license__',
  57. '__status__',
  58. '__description__',
  59. '__keywords__',
  60. '__url__',
  61. '__version__',
  62. '__version_info__',
  63. 'BidirectionalMapping',
  64. 'BidictException',
  65. 'DuplicationPolicy',
  66. 'IGNORE',
  67. 'OVERWRITE',
  68. 'RAISE',
  69. 'DuplicationError',
  70. 'KeyDuplicationError',
  71. 'ValueDuplicationError',
  72. 'KeyAndValueDuplicationError',
  73. 'BidictBase',
  74. 'frozenbidict',
  75. 'bidict',
  76. 'namedbidict',
  77. 'FrozenOrderedBidict',
  78. 'OrderedBidictBase',
  79. 'OrderedBidict',
  80. 'inverted',
  81. )
  82. # * Code review nav *
  83. #==============================================================================
  84. # Current: __init__.py Next: _abc.py →
  85. #==============================================================================