{"id":311300,"date":"2020-10-12T03:00:16","date_gmt":"2020-10-12T03:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311300"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311300","title":{"rendered":"Dependency Injector 4.0 \u2014 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 Python \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/522988\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a93\/37f\/080\/a9337f080e8bc14b3f425debb5c756ae.svg\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u043e\u0432\u0443\u044e \u043c\u0430\u0436\u043e\u0440\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <a href=\"https:\/\/github.com\/ets-labs\/python-dependency-injector\" rel=\"nofollow\">Dependency Injector<\/a>.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0438\u0447\u0430 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 (wiring). \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0435\u0437 \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"python\">from dependency_injector import containers, providers from dependency_injector.wiring import Provide   class Container(containers.DeclarativeContainer):      config = providers.Configuration()      api_client = providers.Singleton(         ApiClient,         api_key=config.api_key,         timeout=config.timeout.as_int(),     )      service = providers.Factory(         Service,         api_client=api_client,     )   def main(service: Service = Provide[Container.service]):     ...   if __name__ == '__main__':     container = Container()     container.config.api_key.from_env('API_KEY')     container.config.timeout.from_env('TIMEOUT')     container.wire(modules=[sys.modules[__name__]])      main()  # &lt;-- \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438      with container.api_client.override(mock.Mock()):         main()  # &lt;-- \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>main()<\/code> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>Service<\/code> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<p>  \u041f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>container.api_client.override()<\/code> \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c API \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u043c\u043e\u043a. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>main()<\/code> \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c <code>Service<\/code> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u043a\u043e\u043c.<\/p>\n<p>  \u041d\u043e\u0432\u0430\u044f \u0444\u0438\u0447\u0430 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 Dependency Injector\u2019\u0430 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 Python \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438.<\/p>\n<h3>\u041a\u0430\u043a \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430\u043c\u0438?<\/h3>\n<p>  \u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 3-\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0441 Flask:<\/p>\n<pre><code class=\"python\">import sys  from dependency_injector import containers, providers from dependency_injector.wiring import Provide from flask import Flask, json   class Service:     ...   class Container(containers.DeclarativeContainer):      service = providers.Factory(Service)   def index_view(service: Service = Provide[Container.service]) -&gt; str:     return json.dumps({'service_id': id(service)})   if __name__ == '__main__':     container = Container()     container.wire(modules=[sys.modules[__name__]])      app = Flask(__name__)     app.add_url_rule('\/', 'index', index_view)     app.run() <\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<ul>\n<li><a href=\"http:\/\/python-dependency-injector.ets-labs.org\/examples\/django.html\" rel=\"nofollow\">Django<\/a><\/li>\n<li><a href=\"http:\/\/python-dependency-injector.ets-labs.org\/examples\/flask.html\" rel=\"nofollow\">Flask (\u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440)<\/a><\/li>\n<li><a href=\"http:\/\/python-dependency-injector.ets-labs.org\/examples\/aiohttp.html\" rel=\"nofollow\">Aiohttp<\/a><\/li>\n<li><a href=\"http:\/\/python-dependency-injector.ets-labs.org\/examples\/sanic.html\" rel=\"nofollow\">Sanic<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435?<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ul>\n<li><b>\u0420\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u0432 \u043a\u043e\u0434\u0435.<\/b> \u041c\u0430\u0440\u043a\u0435\u0440 \u0432\u0438\u0434\u0430 <code>Provide[Container.bar]<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0430. \u041c\u0430\u0440\u043a\u0435\u0440\u044b \u043d\u0443\u0436\u043d\u044b \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0438 \u043a\u0443\u0434\u0430 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c.<\/li>\n<li><b>\u0421\u0432\u044f\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u043c\u0430\u0440\u043a\u0435\u0440\u0430\u043c\u0438 \u0432 \u043a\u043e\u0434\u0435.<\/b> \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 container.wire(modules=[&#8230;], packages=[&#8230;]) \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b.<\/li>\n<li><b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e.<\/b> \u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0438 \u0432\u043d\u0435\u0434\u0440\u0438\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/li>\n<\/ul>\n<p>  \u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0438\u043d\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 <code>container.wire(modules=[...], packages=[...])<\/code> \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u0440\u043e\u0439\u0434\u0435\u0442\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0432 \u044d\u0442\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u0438 \u0438\u0437\u0443\u0447\u0438\u0442 \u0438\u0445 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0415\u0441\u043b\u0438 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0440\u043a\u0435\u0440, \u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0435\u043d\u044b \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u042d\u0442\u043e\u0442 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<pre><code class=\"python\">def foo(bar: Bar = Provide[Container.bar]):     ...   container = Container() container.wire(modules=[sys.modules[__name__]])  foo()  # &lt;--- \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 &quot;bar&quot; \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u0435\u043d  # \u0422\u043e \u0436\u0435 \u0447\u0442\u043e \u0438: foo(bar=container.bar()) <\/code><\/pre>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c <a href=\"http:\/\/python-dependency-injector.ets-labs.org\/wiring.html\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<h3>\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c?<\/h3>\n<p>  \u0412\u0435\u0440\u0441\u0438\u044f 4.0 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 3.\u0445.<\/p>\n<p>  \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 <code>ext.flask<\/code> \u0438 <code>ext.aiohttp<\/code> \u0437\u0430\u0434\u0435\u043f\u0440\u0438\u043a\u0435\u0447\u0435\u043d\u044b \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f.<br \/>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/python-dependency-injector.ets-labs.org\/main\/changelog.html\" rel=\"nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<h3>\u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435?<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u0417\u0430\u0433\u043b\u044f\u043d\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/ets-labs\/python-dependency-injector\" rel=\"nofollow\">Github \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/li>\n<li>\u0417\u0430\u0433\u043b\u044f\u043d\u0438 \u0432 <a href=\"http:\/\/python-dependency-injector.ets-labs.org\/\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/522988\/\"> https:\/\/habr.com\/ru\/post\/522988\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/522988\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a93\/37f\/080\/a9337f080e8bc14b3f425debb5c756ae.svg\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u042f \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b \u043d\u043e\u0432\u0443\u044e \u043c\u0430\u0436\u043e\u0440\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <a href=\"https:\/\/github.com\/ets-labs\/python-dependency-injector\" rel=\"nofollow\">Dependency Injector<\/a>.<\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0444\u0438\u0447\u0430 \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 (wiring). \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u044a\u0435\u043a\u0446\u0438\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u0435\u0437 \u0437\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311300","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311300"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311300\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}