__init__.py 928 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. """Multidict implementation.
  2. HTTP Headers and URL query string require specific data structure:
  3. multidict. It behaves mostly like a dict but it can have
  4. several values for the same key.
  5. """
  6. from ._abc import MultiMapping, MutableMultiMapping
  7. from ._compat import USE_EXTENSIONS
  8. __all__ = (
  9. "MultiMapping",
  10. "MutableMultiMapping",
  11. "MultiDictProxy",
  12. "CIMultiDictProxy",
  13. "MultiDict",
  14. "CIMultiDict",
  15. "upstr",
  16. "istr",
  17. "getversion",
  18. )
  19. __version__ = "6.0.5"
  20. try:
  21. if not USE_EXTENSIONS:
  22. raise ImportError
  23. from ._multidict import (
  24. CIMultiDict,
  25. CIMultiDictProxy,
  26. MultiDict,
  27. MultiDictProxy,
  28. getversion,
  29. istr,
  30. )
  31. except ImportError: # pragma: no cover
  32. from ._multidict_py import (
  33. CIMultiDict,
  34. CIMultiDictProxy,
  35. MultiDict,
  36. MultiDictProxy,
  37. getversion,
  38. istr,
  39. )
  40. upstr = istr