-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathcontentful.html
1288 lines (1178 loc) · 108 KB
/
contentful.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>contentful package — Contentful 2.4.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '2.4.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="contentful" href="modules.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="contentful-package">
<h1>contentful package<a class="headerlink" href="#contentful-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-contentful.array">
<span id="contentful-array-module"></span><h2>contentful.array module<a class="headerlink" href="#module-contentful.array" title="Permalink to this headline">¶</a></h2>
<div class="section" id="contentful-array">
<h3>contentful.array<a class="headerlink" href="#contentful-array" title="Permalink to this headline">¶</a></h3>
<p>This module implements the Array class.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination">https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3">
<li>2017 by Contentful GmbH.</li>
</ol>
</td>
</tr>
<tr class="field-even field"><th class="field-name">license:</th><td class="field-body"><p class="first last">MIT, see LICENSE for more details.</p>
</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="contentful.array.Array">
<em class="property">class </em><code class="descclassname">contentful.array.</code><code class="descname">Array</code><span class="sig-paren">(</span><em>json</em>, <em>items</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/array.html#Array"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.array.Array" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination">https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/collection-resources-and-pagination</a></p>
</dd></dl>
</div>
</div>
<div class="section" id="module-contentful.asset">
<span id="contentful-asset-module"></span><h2>contentful.asset module<a class="headerlink" href="#module-contentful.asset" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.asset.Asset">
<em class="property">class </em><code class="descclassname">contentful.asset.</code><code class="descname">Asset</code><span class="sig-paren">(</span><em>item</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/asset.html#Asset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.asset.Asset" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.FieldsResource" title="contentful.resource.FieldsResource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.FieldsResource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets</a></p>
<dl class="method">
<dt id="contentful.asset.Asset.incoming_references">
<code class="descname">incoming_references</code><span class="sig-paren">(</span><em>client=None</em>, <em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/asset.html#Asset.incoming_references"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.asset.Asset.incoming_references" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all entries referencing the asset</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/links-to-asset">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/links-to-asset</a>
:param client Client instance
:param query: (optional) Dict with API options.
:return: List of <a class="reference internal" href="#contentful.entry.Entry" title="contentful.entry.Entry"><code class="xref py py-class docutils literal"><span class="pre">Entry</span></code></a> objects.
:rtype: List of contentful.entry.Entry</p>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">entries</span> <span class="o">=</span> <span class="n">asset</span><span class="o">.</span><span class="n">incoming_references</span><span class="p">(</span><span class="n">client</span><span class="p">)</span>
<span class="go">[<Entry[cat] id='happycat'>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.asset.Asset.url">
<code class="descname">url</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/asset.html#Asset.url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.asset.Asset.url" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a formatted URL for the Asset’s File
with serialized parameters.</p>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">my_asset</span><span class="o">.</span><span class="n">url</span><span class="p">()</span>
<span class="go">"//images.contentful.com/spaces/foobar/..."</span>
<span class="gp">>>> </span><span class="n">my_asset</span><span class="o">.</span><span class="n">url</span><span class="p">(</span><span class="n">w</span><span class="o">=</span><span class="mi">120</span><span class="p">,</span> <span class="n">h</span><span class="o">=</span><span class="mi">160</span><span class="p">)</span>
<span class="go">"//images.contentful.com/spaces/foobar/...?w=120&h=160"</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.asset_key">
<span id="contentful-asset-key-module"></span><h2>contentful.asset_key module<a class="headerlink" href="#module-contentful.asset_key" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.asset_key.AssetKey">
<em class="property">class </em><code class="descclassname">contentful.asset_key.</code><code class="descname">AssetKey</code><span class="sig-paren">(</span><em>item</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/asset_key.html#AssetKey"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.asset_key.AssetKey" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/asset-keys">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/asset-keys</a></p>
</dd></dl>
</div>
<div class="section" id="module-contentful.client">
<span id="contentful-client-module"></span><h2>contentful.client module<a class="headerlink" href="#module-contentful.client" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.client.Client">
<em class="property">class </em><code class="descclassname">contentful.client.</code><code class="descname">Client</code><span class="sig-paren">(</span><em>space_id</em>, <em>access_token</em>, <em>api_url='cdn.contentful.com'</em>, <em>api_version=1</em>, <em>default_locale='en-US'</em>, <em>environment='master'</em>, <em>https=True</em>, <em>authorization_as_header=True</em>, <em>raw_mode=False</em>, <em>gzip_encoded=True</em>, <em>raise_errors=True</em>, <em>content_type_cache=True</em>, <em>reuse_entries=False</em>, <em>timeout_s=1</em>, <em>proxy_host=None</em>, <em>proxy_port=None</em>, <em>proxy_username=None</em>, <em>proxy_password=None</em>, <em>max_rate_limit_retries=1</em>, <em>max_rate_limit_wait=60</em>, <em>max_include_resolution_depth=20</em>, <em>application_name=None</em>, <em>application_version=None</em>, <em>integration_name=None</em>, <em>integration_version=None</em>, <em>additional_tokens=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Constructs the API Client.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>space_id</strong> – Space ID of your target space.</li>
<li><strong>access_token</strong> – API Access Token (Delivery by default,
Preview if overriding api_url).</li>
<li><strong>api_url</strong> – (optional) URL of the Contentful Target API,
defaults to Delivery API (can be overriden for Preview API).</li>
<li><strong>api_version</strong> – (optional) Target version of the Contentful API.</li>
<li><strong>default_locale</strong> – (optional) Default Locale for your Space,
defaults to ‘en-US’.</li>
<li><strong>environment</strong> – (optional) Default Environment for client, defaults
to ‘master’.</li>
<li><strong>https</strong> – (optional) Boolean determining wether to use https
or http, defaults to True.</li>
<li><strong>authorization_as_header</strong> – (optional) Boolean determining wether
to send access_token through a header or via GET params,
defaults to True.</li>
<li><strong>raw_mode</strong> – (optional) Boolean determining wether to process the
response or return it raw after each API call, defaults to False.</li>
<li><strong>gzip_encoded</strong> – (optional) Boolean determining wether to accept
gzip encoded results, defaults to True.</li>
<li><strong>raise_errors</strong> – (optional) Boolean determining wether to raise
an exception on requests that aren’t successful, defaults to True.</li>
<li><strong>content_type_cache</strong> – (optional) Boolean determining wether to
store a Cache of the Content Types in order to properly coerce
Entry fields, defaults to True.</li>
<li><strong>reuse_entries</strong> – (optional) Boolean determining wether to reuse
hydrated Entry and Asset objects within the same request when possible.
Defaults to False</li>
<li><strong>timeout_s</strong> – (optional) Max time allowed for each API call, in seconds.
Defaults to 1s.</li>
<li><strong>proxy_host</strong> – (optional) URL for Proxy, defaults to None.</li>
<li><strong>proxy_port</strong> – (optional) Port for Proxy, defaults to None.</li>
<li><strong>proxy_username</strong> – (optional) Username for Proxy, defaults to None.</li>
<li><strong>proxy_password</strong> – (optional) Password for Proxy, defaults to None.</li>
<li><strong>max_rate_limit_retries</strong> – (optional) Maximum amount of retries
after RateLimitError, defaults to 1.</li>
<li><strong>max_rate_limit_wait</strong> – (optional) Timeout (in seconds) for waiting
for retry after RateLimitError, defaults to 60.</li>
<li><strong>max_include_resolution_depth</strong> – (optional) Maximum include resolution
level for Resources, defaults to 20 (max include level * 2).</li>
<li><strong>application_name</strong> – (optional) User application name, defaults to None.</li>
<li><strong>application_version</strong> – (optional) User application version, defaults to None.</li>
<li><strong>integration_name</strong> – (optional) Integration name, defaults to None.</li>
<li><strong>integration_version</strong> – (optional) Integration version, defaults to None.</li>
<li><strong>additional_tokens</strong> – (optional) Additional tokens to be sent in the headers for resource resolution, defaults to None.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="#contentful.client.Client" title="contentful.client.Client"><code class="xref py py-class docutils literal"><span class="pre">Client</span></code></a> object.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">contentful.Client</p>
</td>
</tr>
</tbody>
</table>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">contentful</span>
<span class="gp">>>> </span><span class="n">client</span> <span class="o">=</span> <span class="n">contentful</span><span class="o">.</span><span class="n">Client</span><span class="p">(</span><span class="s1">'cfexampleapi'</span><span class="p">,</span> <span class="s1">'b4c0n73n7fu1'</span><span class="p">)</span>
<span class="go"><contentful.Client space_id="cfexampleapi"</span>
<span class="go"> access_token="b4c0n73n7fu1"</span>
<span class="go"> default_locale="en-US"></span>
</pre></div>
</div>
<dl class="method">
<dt id="contentful.client.Client.asset">
<code class="descname">asset</code><span class="sig-paren">(</span><em>asset_id</em>, <em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.asset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.asset" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches an Asset by ID.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/asset/get-a-single-asset">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/asset/get-a-single-asset</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>asset_id</strong> – The ID of the target Asset.</li>
<li><strong>query</strong> – (optional) Dict with API options.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><code class="xref py py-class docutils literal"><span class="pre">Asset</span></code> object.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#contentful.asset.Asset" title="contentful.asset.Asset">contentful.asset.Asset</a></p>
</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">nyancat_asset</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">asset</span><span class="p">(</span><span class="s1">'nyancat'</span><span class="p">)</span>
<span class="go"><Asset id='nyancat' url='//images.contentful.com/cfex...'></span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.assets">
<code class="descname">assets</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.assets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.assets" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all Assets from the Space (up to the set limit, can be modified in <cite>query</cite>).</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/assets-collection/get-all-assets-of-a-space">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/assets-collection/get-all-assets-of-a-space</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of <a class="reference internal" href="#contentful.asset.Asset" title="contentful.asset.Asset"><code class="xref py py-class docutils literal"><span class="pre">Asset</span></code></a> objects.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">List of contentful.asset.Asset</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">assets</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">assets</span><span class="p">()</span>
<span class="go">[<Asset id='1x0xpXu4pSGS4OukSyWGUK' url='//images.content...'>,</span>
<span class="go"> <Asset id='happycat' url='//images.contentful.com/cfexam...'>,</span>
<span class="go"> <Asset id='nyancat' url='//images.contentful.com/cfexamp...'>,</span>
<span class="go"> <Asset id='jake' url='//images.contentful.com/cfexamplea...'>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.content_type">
<code class="descname">content_type</code><span class="sig-paren">(</span><em>content_type_id</em>, <em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.content_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.content_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches a Content Type by ID.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types/content-type/get-a-single-content-type">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types/content-type/get-a-single-content-type</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>content_type_id</strong> – The ID of the target Content Type.</li>
<li><strong>query</strong> – (optional) Dict with API options.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="#contentful.content_type.ContentType" title="contentful.content_type.ContentType"><code class="xref py py-class docutils literal"><span class="pre">ContentType</span></code></a> object.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#contentful.content_type.ContentType" title="contentful.content_type.ContentType">contentful.content_type.ContentType</a></p>
</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">cat_content_type</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">content_type</span><span class="p">(</span><span class="s1">'cat'</span><span class="p">)</span>
<span class="go"><ContentType[Cat] id='cat'></span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.content_types">
<code class="descname">content_types</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.content_types"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.content_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all Content Types from the Space.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types/content-model/get-the-content-model-of-a-space">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types/content-model/get-the-content-model-of-a-space</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of <a class="reference internal" href="#contentful.content_type.ContentType" title="contentful.content_type.ContentType"><code class="xref py py-class docutils literal"><span class="pre">ContentType</span></code></a> objects.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">List of contentful.content_type.ContentType</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">content_types</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">content_types</span><span class="p">()</span>
<span class="go">[<ContentType[City] id='1t9IbcfdCk6m04uISSsaIK'>,</span>
<span class="go"> <ContentType[Human] id='human'>,</span>
<span class="go"> <ContentType[Dog] id='dog'>,</span>
<span class="go"> <ContentType[Cat] id='cat'>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.create_asset_key">
<code class="descname">create_asset_key</code><span class="sig-paren">(</span><em>expires_at</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.create_asset_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.create_asset_key" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates an asset key for signing embargoed asset URLs.
API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/asset-keys/create-asset-key">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/asset-keys/create-asset-key</a>
:param expires_at: (optional) Unix timestamp when the key should expire (max 48h from now).
:return: Dict containing policy and secret for signing URLs.
:rtype: dict
Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">asset_key</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">create_asset_key</span><span class="p">()</span>
<span class="go">{'policy': 'policy_string', 'secret': 'secret_string'}</span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.entries">
<code class="descname">entries</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.entries"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.entries" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all Entries from the Space (up to the set limit, can be modified in <cite>query</cite>).</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection/get-all-entries-of-a-space">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entries-collection/get-all-entries-of-a-space</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of <a class="reference internal" href="#contentful.entry.Entry" title="contentful.entry.Entry"><code class="xref py py-class docutils literal"><span class="pre">Entry</span></code></a> objects.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">List of contentful.entry.Entry</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">entries</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">entries</span><span class="p">()</span>
<span class="go">[<Entry[cat] id='happycat'>,</span>
<span class="go"> <Entry[1t9IbcfdCk6m04uISSsaIK] id='5ETMRzkl9KM4omyMwKAOki'>,</span>
<span class="go"> <Entry[dog] id='6KntaYXaHSyIw8M6eo26OK'>,</span>
<span class="go"> <Entry[1t9IbcfdCk6m04uISSsaIK] id='7qVBlCjpWE86Oseo40gAEY'>,</span>
<span class="go"> <Entry[cat] id='garfield'>,</span>
<span class="go"> <Entry[1t9IbcfdCk6m04uISSsaIK] id='4MU1s3potiUEM2G4okYOqw'>,</span>
<span class="go"> <Entry[cat] id='nyancat'>,</span>
<span class="go"> <Entry[1t9IbcfdCk6m04uISSsaIK] id='ge1xHyH3QOWucKWCCAgIG'>,</span>
<span class="go"> <Entry[human] id='finn'>,</span>
<span class="go"> <Entry[dog] id='jake'>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.entry">
<code class="descname">entry</code><span class="sig-paren">(</span><em>entry_id</em>, <em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches an Entry by ID.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entry/get-a-single-entry">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries/entry/get-a-single-entry</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>entry_id</strong> – The ID of the target Entry.</li>
<li><strong>query</strong> – (optional) Dict with API options.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><a class="reference internal" href="#contentful.entry.Entry" title="contentful.entry.Entry"><code class="xref py py-class docutils literal"><span class="pre">Entry</span></code></a> object.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#contentful.entry.Entry" title="contentful.entry.Entry">contentful.entry.Entry</a></p>
</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">nyancat_entry</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">entry</span><span class="p">(</span><span class="s1">'nyancat'</span><span class="p">)</span>
<span class="go"><Entry[cat] id='nyancat'></span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.environment_url">
<code class="descname">environment_url</code><span class="sig-paren">(</span><em>url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.environment_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.environment_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Formats the URL with the environment.</p>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.locales">
<code class="descname">locales</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.locales"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.locales" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all Locales from the Environment (up to the set limit, can be modified in <cite>query</cite>).</p>
<p># TODO: fix url
API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/assets-collection/get-all-assets-of-a-space">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/assets/assets-collection/get-all-assets-of-a-space</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of <a class="reference internal" href="#contentful.locale.Locale" title="contentful.locale.Locale"><code class="xref py py-class docutils literal"><span class="pre">Locale</span></code></a> objects.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">List of contentful.locale.Locale</td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">locales</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">locales</span><span class="p">()</span>
<span class="go">[<Locale[English (United States)] code='en-US' default=True fallback_code=None optional=False>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.space">
<code class="descname">space</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.space"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.space" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches the current Space.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/spaces/get-a-space">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/spaces/get-a-space</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#contentful.space.Space" title="contentful.space.Space"><code class="xref py py-class docutils literal"><span class="pre">Space</span></code></a> object.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#contentful.space.Space" title="contentful.space.Space">contentful.space.Space</a></td>
</tr>
</tbody>
</table>
<p>Usage:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">space</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">space</span><span class="p">()</span>
<span class="go"><Space[Contentful Example API] id='cfexampleapi'></span>
</pre></div>
</div>
</dd></dl>
<dl class="method">
<dt id="contentful.client.Client.sync">
<code class="descname">sync</code><span class="sig-paren">(</span><em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/client.html#Client.sync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.client.Client.sync" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches content from the Sync API.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization/initial-synchronization/query-entries">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization/initial-synchronization/query-entries</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>query</strong> – (optional) Dict with API options.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><a class="reference internal" href="#contentful.sync_page.SyncPage" title="contentful.sync_page.SyncPage"><code class="xref py py-class docutils literal"><span class="pre">SyncPage</span></code></a> object.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#contentful.sync_page.SyncPage" title="contentful.sync_page.SyncPage">contentful.sync_page.SyncPage</a></td>
</tr>
</tbody>
</table>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">sync_page</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">sync</span><span class="p">({</span><span class="s1">'initial'</span><span class="p">:</span> <span class="kc">True</span><span class="p">})</span>
<span class="go"><SyncPage next_sync_token='w5ZGw6JFwqZmVcKsE8Kow4grw45QdybC...'></span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.content_type">
<span id="contentful-content-type-module"></span><h2>contentful.content_type module<a class="headerlink" href="#module-contentful.content_type" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.content_type.ContentType">
<em class="property">class </em><code class="descclassname">contentful.content_type.</code><code class="descname">ContentType</code><span class="sig-paren">(</span><em>item</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type.html#ContentType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type.ContentType" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types</a></p>
<dl class="method">
<dt id="contentful.content_type.ContentType.field_for">
<code class="descname">field_for</code><span class="sig-paren">(</span><em>field_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type.html#ContentType.field_for"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type.ContentType.field_for" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches the field for the given Field ID.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field_id</strong> – ID for Field to fetch.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">ContentTypeField</span></code> object.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">contentful.ContentTypeField</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.content_type_cache">
<span id="contentful-content-type-cache-module"></span><h2>contentful.content_type_cache module<a class="headerlink" href="#module-contentful.content_type_cache" title="Permalink to this headline">¶</a></h2>
<div class="section" id="contentful-content-type-cache">
<h3>contentful.content_type_cache<a class="headerlink" href="#contentful-content-type-cache" title="Permalink to this headline">¶</a></h3>
<p>This module implements the ContentTypeCache class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3">
<li>2016 by Contentful GmbH.</li>
</ol>
</td>
</tr>
<tr class="field-even field"><th class="field-name">license:</th><td class="field-body"><p class="first last">MIT, see LICENSE for more details.</p>
</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="contentful.content_type_cache.ContentTypeCache">
<em class="property">class </em><code class="descclassname">contentful.content_type_cache.</code><code class="descname">ContentTypeCache</code><a class="reference internal" href="_modules/contentful/content_type_cache.html#ContentTypeCache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_cache.ContentTypeCache" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Cache for Content Types.</p>
<p>Used for properly coercing Entry fields.</p>
<dl class="classmethod">
<dt id="contentful.content_type_cache.ContentTypeCache.get">
<em class="property">classmethod </em><code class="descname">get</code><span class="sig-paren">(</span><em>space_id</em>, <em>content_type_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_cache.html#ContentTypeCache.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_cache.ContentTypeCache.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches a Content Type from the Cache.</p>
</dd></dl>
<dl class="classmethod">
<dt id="contentful.content_type_cache.ContentTypeCache.update_cache">
<em class="property">classmethod </em><code class="descname">update_cache</code><span class="sig-paren">(</span><em>client</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_cache.html#ContentTypeCache.update_cache"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_cache.ContentTypeCache.update_cache" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates the Cache with all Content Types from the Space.</p>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="section" id="module-contentful.content_type_field">
<span id="contentful-content-type-field-module"></span><h2>contentful.content_type_field module<a class="headerlink" href="#module-contentful.content_type_field" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.content_type_field.ContentTypeField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field.</code><code class="descname">ContentTypeField</code><span class="sig-paren">(</span><em>field_data</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field.html#ContentTypeField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field.ContentTypeField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/content-types</a></p>
<dl class="method">
<dt id="contentful.content_type_field.ContentTypeField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field.html#ContentTypeField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field.ContentTypeField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces the value to the proper type.</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.content_type_field_types">
<span id="contentful-content-type-field-types-module"></span><h2>contentful.content_type_field_types module<a class="headerlink" href="#module-contentful.content_type_field_types" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.content_type_field_types.ArrayField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">ArrayField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#ArrayField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.ArrayField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Array Coercion Class</p>
<p>Coerces items in collection with it’s proper Coercion Class.</p>
<dl class="method">
<dt id="contentful.content_type_field_types.ArrayField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#ArrayField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.ArrayField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces array items with proper coercion.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.BasicField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">BasicField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#BasicField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.BasicField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Base Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.BasicField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#BasicField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.BasicField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Just returns the value.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.BooleanField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">BooleanField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#BooleanField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.BooleanField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Boolean Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.BooleanField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#BooleanField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.BooleanField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to boolean</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.DateField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">DateField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#DateField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.DateField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Date Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.DateField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#DateField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.DateField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces ISO8601 date to <code class="xref py py-class docutils literal"><span class="pre">datetime.datetime</span></code> object.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.IntegerField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">IntegerField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#IntegerField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.IntegerField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Integer Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.IntegerField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#IntegerField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.IntegerField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to int</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.LinkField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">LinkField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#LinkField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.LinkField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Nothing should be done here as include resolution is handled within
entries due to depth handling (explained within Entry).
Only present as a placeholder for proper resolution within ContentType.</p>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.LocationField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">LocationField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#LocationField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.LocationField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Location Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.LocationField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#LocationField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.LocationField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to Location object</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.NumberField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">NumberField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#NumberField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.NumberField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Number Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.NumberField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#NumberField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.NumberField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to float</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.ObjectField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">ObjectField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#ObjectField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.ObjectField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Object Coercion Class.</p>
<dl class="method">
<dt id="contentful.content_type_field_types.ObjectField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#ObjectField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.ObjectField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces JSON values properly.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.ResourceLinkField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">ResourceLinkField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#ResourceLinkField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.ResourceLinkField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Nothing should be done here as include resolution is handled within
entries.
Only present as a placeholder for proper resolution within ContentType.</p>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.RichTextField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">RichTextField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#RichTextField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.RichTextField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Coerces Rich Text fields and resolves includes for entries included.</p>
<dl class="method">
<dt id="contentful.content_type_field_types.RichTextField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>includes=None</em>, <em>errors=None</em>, <em>resources=None</em>, <em>default_locale='en-US'</em>, <em>locale=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#RichTextField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.RichTextField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces Rich Text properly.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.SymbolField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">SymbolField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#SymbolField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.SymbolField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Symbol Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.SymbolField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#SymbolField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.SymbolField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to str</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.content_type_field_types.TextField">
<em class="property">class </em><code class="descclassname">contentful.content_type_field_types.</code><code class="descname">TextField</code><span class="sig-paren">(</span><em>items=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#TextField"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.TextField" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.content_type_field_types.BasicField" title="contentful.content_type_field_types.BasicField"><code class="xref py py-class docutils literal"><span class="pre">contentful.content_type_field_types.BasicField</span></code></a></p>
<p>Text Coercion Class</p>
<dl class="method">
<dt id="contentful.content_type_field_types.TextField.coerce">
<code class="descname">coerce</code><span class="sig-paren">(</span><em>value</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/content_type_field_types.html#TextField.coerce"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.content_type_field_types.TextField.coerce" title="Permalink to this definition">¶</a></dt>
<dd><p>Coerces value to str</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.deleted_asset">
<span id="contentful-deleted-asset-module"></span><h2>contentful.deleted_asset module<a class="headerlink" href="#module-contentful.deleted_asset" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.deleted_asset.DeletedAsset">
<em class="property">class </em><code class="descclassname">contentful.deleted_asset.</code><code class="descname">DeletedAsset</code><span class="sig-paren">(</span><em>item</em>, <em>default_locale='en-US'</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/deleted_asset.html#DeletedAsset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.deleted_asset.DeletedAsset" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization</a></p>
</dd></dl>
</div>
<div class="section" id="module-contentful.deleted_entry">
<span id="contentful-deleted-entry-module"></span><h2>contentful.deleted_entry module<a class="headerlink" href="#module-contentful.deleted_entry" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.deleted_entry.DeletedEntry">
<em class="property">class </em><code class="descclassname">contentful.deleted_entry.</code><code class="descname">DeletedEntry</code><span class="sig-paren">(</span><em>item</em>, <em>default_locale='en-US'</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/deleted_entry.html#DeletedEntry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.deleted_entry.DeletedEntry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/synchronization</a></p>
</dd></dl>
</div>
<div class="section" id="module-contentful.entry">
<span id="contentful-entry-module"></span><h2>contentful.entry module<a class="headerlink" href="#module-contentful.entry" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.entry.Entry">
<em class="property">class </em><code class="descclassname">contentful.entry.</code><code class="descname">Entry</code><span class="sig-paren">(</span><em>item</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/entry.html#Entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.entry.Entry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.FieldsResource" title="contentful.resource.FieldsResource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.FieldsResource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/entries</a></p>
<dl class="method">
<dt id="contentful.entry.Entry.incoming_references">
<code class="descname">incoming_references</code><span class="sig-paren">(</span><em>client=None</em>, <em>query=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/entry.html#Entry.incoming_references"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.entry.Entry.incoming_references" title="Permalink to this definition">¶</a></dt>
<dd><p>Fetches all entries referencing the entry</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/links-to-asset">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/links-to-asset</a></p>
<p>:param client Client instance
:param query: (optional) Dict with API options.
:return: List of <a class="reference internal" href="#contentful.entry.Entry" title="contentful.entry.Entry"><code class="xref py py-class docutils literal"><span class="pre">Entry</span></code></a> objects.
:rtype: List of contentful.entry.Entry</p>
<dl class="docutils">
<dt>Usage:</dt>
<dd><div class="first last highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">entries</span> <span class="o">=</span> <span class="n">entry</span><span class="o">.</span><span class="n">incoming_references</span><span class="p">(</span><span class="n">client</span><span class="p">)</span>
<span class="go">[<Entry[cat] id='happycat'>]</span>
</pre></div>
</div>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-contentful.errors">
<span id="contentful-errors-module"></span><h2>contentful.errors module<a class="headerlink" href="#module-contentful.errors" title="Permalink to this headline">¶</a></h2>
<div class="section" id="contentful-errors">
<h3>contentful.errors<a class="headerlink" href="#contentful-errors" title="Permalink to this headline">¶</a></h3>
<p>This module implements the Error classes.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/errors">https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/errors</a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3">
<li>2016 by Contentful GmbH.</li>
</ol>
</td>
</tr>
<tr class="field-even field"><th class="field-name">license:</th><td class="field-body"><p class="first last">MIT, see LICENSE for more details.</p>
</td>
</tr>
</tbody>
</table>
<dl class="exception">
<dt id="contentful.errors.AccessDeniedError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">AccessDeniedError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#AccessDeniedError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.AccessDeniedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>403</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.BadGatewayError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">BadGatewayError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#BadGatewayError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.BadGatewayError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>502</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.BadRequestError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">BadRequestError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#BadRequestError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.BadRequestError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>400</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.EntryNotFoundError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">EntryNotFoundError</code><a class="reference internal" href="_modules/contentful/errors.html#EntryNotFoundError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.EntryNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">Exception</span></code></p>
<p>Error for entry not found.</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.HTTPError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">HTTPError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#HTTPError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.HTTPError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">Exception</span></code></p>
<p>Base HTTP Error Class</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.NotFoundError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">NotFoundError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#NotFoundError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.NotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>404</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.RateLimitExceededError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">RateLimitExceededError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#RateLimitExceededError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.RateLimitExceededError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>429</p>
<dl class="attribute">
<dt id="contentful.errors.RateLimitExceededError.RATE_LIMIT_RESET_HEADER_KEY">
<code class="descname">RATE_LIMIT_RESET_HEADER_KEY</code><em class="property"> = 'x-contentful-ratelimit-reset'</em><a class="headerlink" href="#contentful.errors.RateLimitExceededError.RATE_LIMIT_RESET_HEADER_KEY" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="contentful.errors.RateLimitExceededError.reset_time">
<code class="descname">reset_time</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#RateLimitExceededError.reset_time"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.RateLimitExceededError.reset_time" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the reset time in seconds until next available request.</p>
</dd></dl>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.ServerError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">ServerError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#ServerError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.ServerError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>500</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.ServiceUnavailableError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">ServiceUnavailableError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#ServiceUnavailableError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.ServiceUnavailableError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>503</p>
</dd></dl>
<dl class="exception">
<dt id="contentful.errors.UnauthorizedError">
<em class="property">exception </em><code class="descclassname">contentful.errors.</code><code class="descname">UnauthorizedError</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#UnauthorizedError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.UnauthorizedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.errors.HTTPError" title="contentful.errors.HTTPError"><code class="xref py py-class docutils literal"><span class="pre">contentful.errors.HTTPError</span></code></a></p>
<p>401</p>
</dd></dl>
<dl class="function">
<dt id="contentful.errors.get_error">
<code class="descclassname">contentful.errors.</code><code class="descname">get_error</code><span class="sig-paren">(</span><em>response</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/errors.html#get_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.errors.get_error" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets Error by HTTP Status Code</p>
</dd></dl>
</div>
</div>
<div class="section" id="module-contentful.locale">
<span id="contentful-locale-module"></span><h2>contentful.locale module<a class="headerlink" href="#module-contentful.locale" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.locale.Locale">
<em class="property">class </em><code class="descclassname">contentful.locale.</code><code class="descname">Locale</code><span class="sig-paren">(</span><em>item</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/locale.html#Locale"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.locale.Locale" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/localization">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/localization</a></p>
</dd></dl>
</div>
<div class="section" id="module-contentful.resource">
<span id="contentful-resource-module"></span><h2>contentful.resource module<a class="headerlink" href="#module-contentful.resource" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.resource.FieldsResource">
<em class="property">class </em><code class="descclassname">contentful.resource.</code><code class="descname">FieldsResource</code><span class="sig-paren">(</span><em>item</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#FieldsResource"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.FieldsResource" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>Fields Resource Class</p>
<p>Implements locale handling for Resource fields.</p>
<dl class="method">
<dt id="contentful.resource.FieldsResource.fields">
<code class="descname">fields</code><span class="sig-paren">(</span><em>locale=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#FieldsResource.fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.FieldsResource.fields" title="Permalink to this definition">¶</a></dt>
<dd><p>Get fields for a specific locale</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>locale</strong> – (optional) Locale to fetch, defaults to default_locale.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="contentful.resource.FieldsResource.locale">
<code class="descname">locale</code><a class="headerlink" href="#contentful.resource.FieldsResource.locale" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.resource.Link">
<em class="property">class </em><code class="descclassname">contentful.resource.</code><code class="descname">Link</code><span class="sig-paren">(</span><em>item</em>, <em>default_locale='en-US'</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#Link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.Link" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>Link Class</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/links">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/links</a></p>
<dl class="method">
<dt id="contentful.resource.Link.resolve">
<code class="descname">resolve</code><span class="sig-paren">(</span><em>client</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#Link.resolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.Link.resolve" title="Permalink to this definition">¶</a></dt>
<dd><p>Resolves Link to a specific Resource</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="contentful.resource.Resource">
<em class="property">class </em><code class="descclassname">contentful.resource.</code><code class="descname">Resource</code><span class="sig-paren">(</span><em>item</em>, <em>default_locale='en-US'</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#Resource"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.Resource" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Base Resource Class</p>
<p>Implements common resource attributes.</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes">https://www.contentful.com/developers/docs/references/content-delivery-api/#/introduction/common-resource-attributes</a></p>
</dd></dl>
<dl class="class">
<dt id="contentful.resource.ResourceLink">
<em class="property">class </em><code class="descclassname">contentful.resource.</code><code class="descname">ResourceLink</code><span class="sig-paren">(</span><em>item</em>, <em>default_locale='en-US'</em>, <em>includes=None</em>, <em>errors=None</em>, <em>localized=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource.html#ResourceLink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource.ResourceLink" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#contentful.resource.Resource" title="contentful.resource.Resource"><code class="xref py py-class docutils literal"><span class="pre">contentful.resource.Resource</span></code></a></p>
<p>Resource Link Class</p>
<p>API Reference: <a class="reference external" href="https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/resource-links">https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/resource-links</a></p>
</dd></dl>
</div>
<div class="section" id="module-contentful.resource_builder">
<span id="contentful-resource-builder-module"></span><h2>contentful.resource_builder module<a class="headerlink" href="#module-contentful.resource_builder" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="contentful.resource_builder.ResourceBuilder">
<em class="property">class </em><code class="descclassname">contentful.resource_builder.</code><code class="descname">ResourceBuilder</code><span class="sig-paren">(</span><em>default_locale</em>, <em>localized</em>, <em>json</em>, <em>includes_for_single=None</em>, <em>errors_for_single=None</em>, <em>reuse_entries=False</em>, <em>resources=None</em>, <em>depth=0</em>, <em>max_depth=20</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource_builder.html#ResourceBuilder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource_builder.ResourceBuilder" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Creates objects of the proper Resource Type</p>
<dl class="method">
<dt id="contentful.resource_builder.ResourceBuilder.build">
<code class="descname">build</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/contentful/resource_builder.html#ResourceBuilder.build"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#contentful.resource_builder.ResourceBuilder.build" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates the objects from the JSON response</p>
</dd></dl>
</dd></dl>