__init__.py 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # -*- coding: utf-8 -*-
  2. from hapic.hapic import Hapic
  3. _hapic_default = Hapic()
  4. with_api_doc = _hapic_default.with_api_doc
  5. input_headers = _hapic_default.input_headers
  6. input_body = _hapic_default.input_body
  7. input_path = _hapic_default.input_path
  8. input_query = _hapic_default.input_query
  9. input_forms = _hapic_default.input_forms
  10. output_headers = _hapic_default.output_headers
  11. output_body = _hapic_default.output_body
  12. # with_api_doc_bis = _hapic_default.with_api_doc_bis
  13. generate_doc = _hapic_default.generate_doc
  14. # from hapic.hapic import with_api_doc
  15. # from hapic.hapic import with_api_doc_bis
  16. # from hapic.hapic import generate_doc
  17. # from hapic.hapic import output_body
  18. # from hapic.hapic import input_body
  19. # from hapic.hapic import input_query
  20. # from hapic.hapic import input_path
  21. # from hapic.hapic import input_headers
  22. # from hapic.context import BottleContext
  23. # from hapic.hapic import set_fake_default_context
  24. # from hapic.hapic import error_schema
  25. # class FakeSetContext(object):
  26. # def bottle_context(self):
  27. # hapic.set_fake_default_context(BottleContext())
  28. # def decorator(func):
  29. # def wrapper(*args, **kwargs):
  30. # return func(*args, **kwargs)
  31. # return wrapper
  32. # return decorator
  33. #
  34. #
  35. # class FakeExt(object):
  36. # bottle = FakeSetContext()
  37. #
  38. #
  39. # ext = FakeExt()