-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_plugin.html
1355 lines (1274 loc) · 89.8 KB
/
api_plugin.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>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Plugin API — HappyPanda X 0.13.3#170 documentation</title>
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="https://platform.twitter.com/widgets.js"></script>
<script src="_static/script.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Server API" href="api.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js "></script>
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><span><img src="_static/hpx_logo.svg"></span>
HappyPanda X</a>
<span class="navbar-text navbar-version pull-left"><b>0.13.3#170</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="index.html">Contents <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installing</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#installing-plugins">Installing plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#securing-happypanda-x">Securing HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html#exposing-happypanda-x">Exposing HappyPanda X</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translations</a></li>
<li class="toctree-l1"><a class="reference internal" href="settings.html">Settings</a></li>
<li class="toctree-l1"><a class="reference internal" href="switches.html">Command-Line Arguments</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">FAQ</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="env.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="env.html#editing-the-documentation">Editing the documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="client.html">Creating frontends</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugin.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="todo.html">TODO</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="api_general.html">General</a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Server API</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Plugin API</a></li>
</ul>
</ul>
</li>
<li>
<a href="api.html" title="Previous Chapter: Server API"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« Server API</span>
</a>
</li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<ul class="quick-links">
<li>
<strong>Quick links</strong>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/twiddli" aria-label="Follow @twiddli on GitHub">Follow @twiddli</a>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax/issues" data-icon="octicon-issue-opened" data-show-count="true" aria-label="Issue happypandax/happypandax on GitHub">Issue</a>
</li>
<li class="divider">·</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax" data-icon="octicon-star" data-show-count="true" aria-label="Star happypandax/happypandax on GitHub">Star</a>
</li>
<li class="quick-link">
<a class="github-button" href="https://github.com/happypandax/happypandax/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork happypandax/happypandax on GitHub">Fork</a>
</li>
<li class="divider">·</li>
<li class="quick-link">
<a href="https://twitter.com/twiddly_"
class="twitter-follow-button" data-width="145px"
data-link-color="#0069D6" data-show-count="false">
Follow
@twiddly_
</a>
</li>
<li class="quick-link">
<a href="https://twitter.com/share" class="twitter-share-button"
data-url="" data-count="horizontal"
data-via="twbootstrap"
data-related="twiddly_:Creator of HappyPanda X">Tweet</a>
</li>
</ul>
<div class="container">
<div class="row">
<div class="col-md-3">
<div id="sidebar" class="bs-sidenav" role="complementary"><ul>
<li><a class="reference internal" href="#">Plugin API</a><ul>
<li><a class="reference internal" href="#interface">Interface</a></li>
<li><a class="reference internal" href="#special-commands">Special Commands</a></li>
<li><a class="reference internal" href="#summary">Summary</a></li>
<li><a class="reference internal" href="#module-happypanda.core.commands.meta_cmd">Commands</a><ul>
<li><a class="reference internal" href="#meta">.Meta</a></li>
<li><a class="reference internal" href="#i-o">.I/O</a></li>
<li><a class="reference internal" href="#database">.Database</a></li>
<li><a class="reference internal" href="#item">.Item</a></li>
<li><a class="reference internal" href="#gallery">.Gallery</a></li>
<li><a class="reference internal" href="#item-data">.Item Data</a></li>
<li><a class="reference internal" href="#login">.Login</a></li>
<li><a class="reference internal" href="#metadata">.Metadata</a></li>
<li><a class="reference internal" href="#search">.Search</a></li>
<li><a class="reference internal" href="#network">.Network</a></li>
<li><a class="reference internal" href="#download">.Download</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="col-md-9 content">
<div class="section" id="plugin-api">
<h1>Plugin API<a class="headerlink" href="#plugin-api" title="Permalink to this headline">¶</a></h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Please know that the API is not stable at this time. API changes, additions and removals are
only documented in the release changelogs, so make sure to read them. Things should stabilize once
HPX enters beta status.</p>
</div>
<span class="target" id="module-happypanda.core.plugin_interface"></span><div class="section" id="interface">
<h2>Interface<a class="headerlink" href="#interface" title="Permalink to this headline">¶</a></h2>
<p>The plugin interface module is named <code class="docutils literal notranslate"><span class="pre">__hpx__</span></code>.
Import it in your plugin to access the methods and classes defined by the module:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">__hpx__</span> <span class="k">as</span> <span class="nn">hpx</span>
<span class="n">logger</span> <span class="o">=</span> <span class="n">hpx</span><span class="o">.</span><span class="n">get_logger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>
</pre></div>
</div>
<p>In addition to what is defined here, <a class="reference internal" href="api_general.html#module-happypanda.common.exceptions"><span class="std std-ref">exceptions</span></a> and <a class="reference internal" href="api_general.html#module-happypanda.interface.enums"><span class="std std-ref">enums</span></a> defined by HPX are also available at the module-level
and can be imported like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">__hpx__</span> <span class="k">as</span> <span class="nn">hpx</span>
<span class="kn">from</span> <span class="nn">__hpx__</span> <span class="kn">import</span> <span class="n">PluginError</span><span class="p">,</span> <span class="n">PluginState</span>
<span class="nb">print</span><span class="p">(</span><span class="n">PluginState</span><span class="p">)</span> <span class="c1"># -> <enum 'PluginState'></span>
<span class="nb">print</span><span class="p">(</span><span class="n">hpx</span><span class="o">.</span><span class="n">ImageSize</span><span class="p">)</span> <span class="c1"># -> <enum 'ImageSize'></span>
<span class="k">raise</span> <span class="n">PluginError</span><span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">""</span><span class="p">)</span>
<span class="k">raise</span> <span class="n">hpx</span><span class="o">.</span><span class="n">PluginError</span><span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">""</span><span class="p">)</span>
</pre></div>
</div>
<p><strong>command</strong></p>
<p>The object <code class="docutils literal notranslate"><span class="pre">command</span></code> is available on the module-level and provides access to the various different commands defined by HPX:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">__hpx__</span> <span class="kn">import</span> <span class="n">command</span>
<span class="n">command</span><span class="o">.</span><span class="n">CheckUpdate</span><span class="p">()</span>
</pre></div>
</div>
<p>See <a class="reference internal" href="#module-happypanda.core.commands.meta_cmd"><span class="std std-ref">Commands</span></a> for all the various commands available information.</p>
<hr class="docutils" />
<p><strong>constants</strong></p>
<p>The object <code class="docutils literal notranslate"><span class="pre">constants</span></code> is available on the module-level and provides various useful constant values.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">__hpx__</span> <span class="kn">import</span> <span class="n">constants</span>
<span class="nb">print</span><span class="p">(</span><span class="n">constants</span><span class="o">.</span><span class="n">version</span><span class="p">)</span> <span class="c1"># -> (0, 0, 0)</span>
</pre></div>
</div>
<blockquote>
<div><ul class="simple">
<li><p>version: current HPX version</p></li>
<li><p>database_version: current HPX database version</p></li>
<li><p>webclient_version: current HPX webclient version</p></li>
<li><p>dev: developer mode enabled</p></li>
<li><p>debug: debug mode enabled</p></li>
<li><p>is_frozen: application has been made into an executable</p></li>
<li><p>is_osx: application is running on OS X</p></li>
<li><p>is_linux: application is running on Linux</p></li>
<li><p>is_win: application is running on Windows</p></li>
<li><p>is_posix: application is running on a posix-compliant OS (true for both OS X and Linux)</p></li>
<li><p>download_path: path to the downloads folder</p></li>
<li><p>tumbnail_path: path to the thumbnails folder</p></li>
<li><p>translation_path: path to the translations folder</p></li>
<li><p>current_dir: path to the plugin’s folder</p></li>
</ul>
<p><strong>current_dir</strong> : <em>str</em> =</p>
<p><strong>database_version</strong> : <em>tuple</em> = (0, 9, 0)</p>
<p><strong>debug</strong> : <em>bool</em> = False</p>
<p><strong>dev</strong> : <em>bool</em> = False</p>
<p><strong>download_path</strong> : <em>str</em> = downloads</p>
<p><strong>is_frozen</strong> : <em>bool</em> = False</p>
<p><strong>is_linux</strong> : <em>bool</em> = True</p>
<p><strong>is_osx</strong> : <em>bool</em> = False</p>
<p><strong>is_posix</strong> : <em>bool</em> = True</p>
<p><strong>is_win</strong> : <em>bool</em> = False</p>
<p><strong>thumbnail_path</strong> : <em>str</em> = static/thumbnails</p>
<p><strong>translation_path</strong> : <em>str</em> = translations</p>
<p><strong>version</strong> : <em>tuple</em> = (0, 13, 3)</p>
<p><strong>webclient_version</strong> : <em>tuple</em> = (0, 13, 1)</p>
</div></blockquote>
<hr class="docutils" />
<dl class="py function">
<dt id="happypanda.core.plugin_interface.addfilter">
<code class="sig-name descname">addfilter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">command</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">on</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.addfilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a callable to a pipeline command</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code>]) – a callable</p></li>
<li><p><strong>command</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – name of pipeline command</p></li>
<li><p><strong>on</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – on a specific action</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.attach">
<code class="sig-name descname">attach</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">command</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trigger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.attach" title="Permalink to this definition">¶</a></dt>
<dd><p>Attach a handler to a command entry</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code>]) – command handler</p></li>
<li><p><strong>command</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – a fully qualified command name, required</p></li>
<li><p><strong>trigger</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>, <code class="docutils literal notranslate"><span class="pre">None</span></code>]) – trigger only on a special keyword</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.get_logger">
<code class="sig-name descname">get_logger</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.get_logger" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the <code class="xref py py-class docutils literal notranslate"><span class="pre">logging.Logger</span></code> object for this plugin</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – name of logger</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.get_plugin_config">
<code class="sig-name descname">get_plugin_config</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.get_plugin_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a dict-like object with configuration specific to this plugin</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>dict-like object</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.get_setting">
<code class="sig-name descname">get_setting</code><span class="sig-paren">(</span><em class="sig-param">namespace</em>, <em class="sig-param">key</em>, <em class="sig-param">default=<class 'happypanda.core.plugin_interface._NO_DEFAULT'></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.get_setting" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the value of any setting in the configuration. See <a class="reference internal" href="settings.html#settings"><span class="std std-ref">Settings</span></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>namespace</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – setting namespace</p></li>
<li><p><strong>key</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – setting key</p></li>
<li><p><strong>default</strong> – default value if no key was found</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>value of setting or default value if default was set, else raise a KeyError</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.removefilter">
<code class="sig-name descname">removefilter</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">command</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">on</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.removefilter" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a callable from a pipeline command</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code>]) – a callable</p></li>
<li><p><strong>command</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – name of pipeline command</p></li>
<li><p><strong>on</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – on a specific action</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a boolean indicating whether the filter was removed</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.save_plugin_config">
<code class="sig-name descname">save_plugin_config</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">obj</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.save_plugin_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Save configuration specific to this plugin</p>
<p>The configuration will appear in the <code class="docutils literal notranslate"><span class="pre">plugin.config.<plugin</span> <span class="pre">shortname></span></code> namespace.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>obj</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>) – dict-like object</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>bool on if config was saved</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.subscribe">
<code class="sig-name descname">subscribe</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">f</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">commandevent</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">trigger</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.subscribe" title="Permalink to this definition">¶</a></dt>
<dd><p>Subscribe a handler to a command event</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>f</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-data docutils literal notranslate"><span class="pre">Callable</span></code>]) – command event handler</p></li>
<li><p><strong>commandevent</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Optional</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – a fully qualified command event name, required</p></li>
<li><p><strong>trigger</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>, <code class="docutils literal notranslate"><span class="pre">None</span></code>]) – trigger only on a special keyword</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="happypanda.core.plugin_interface.update_setting">
<code class="sig-name descname">update_setting</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">namespace</span></em>, <em class="sig-param"><span class="n">key</span></em>, <em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">user</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="headerlink" href="#happypanda.core.plugin_interface.update_setting" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the value of any setting in the configuration. See <a class="reference internal" href="settings.html#settings"><span class="std std-ref">Settings</span></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>namespace</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – setting namespace</p></li>
<li><p><strong>key</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – setting key</p></li>
<li><p><strong>value</strong> (<code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]) – value to set</p></li>
<li><p><strong>user</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code>) – the value should only apply to the current client user. Note that a user haven’t necessarily been assigned.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="special-commands">
<h2>Special Commands<a class="headerlink" href="#special-commands" title="Permalink to this headline">¶</a></h2>
<p>Besides the command entries and events listed here, HPX also provides some plugin meta events that are specific for each plugin.
These events are emitted on plugin state changes. See <a class="reference internal" href="api_general.html#happypanda.interface.enums.PluginState" title="happypanda.interface.enums.PluginState"><code class="xref py py-class docutils literal notranslate"><span class="pre">PluginState</span></code></a> for the different kinds of plugin states.</p>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">init</span></code> – this event is emitted for a plugin after it has initialized and <em>after</em> all its dependencies has been initialized.</dt><dd><p>It is therefore ideal to put the plugin’s own initialization on this event.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">disable</span></code> – this event is emitted when a plugin has been disabled, either manually by the user or because of some other cause.</dt><dd><p>The plugin should listen to this event to terminate any on-going process it has running.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">remove</span></code> – this event is emitted just before a plugin is to be removed. HPX will handle the deletion of the plugin folder.</dt><dd><p>The <code class="docutils literal notranslate"><span class="pre">disable</span></code> event will always be emitted before this event. The plugin should listen to this event to remove any produced items
that would still be lingering even after its folder has been deleted.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">before_update</span></code> – this event is emitted just before a plugin is updated.</dt><dd><p>The plugin should listen to this event to perform actions before it is updated.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">after_update</span></code> – this event is emitted just after a plugin has been updated.</dt><dd><p>The plugin should listen to this event to perform actions after it has been updated.</p>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">config_update</span> <span class="pre">(dict)</span></code> – this event is emitted with a <code class="docutils literal notranslate"><span class="pre">dict</span></code> of configuration that has been updated, usually from a client.</dt><dd><p>The plugin should listen to this event to be notified when its configuration has been updated.</p>
</dd>
</dl>
</li>
</ul>
<p>These are special entries each plugin can attach to.</p>
<ul class="simple">
<li><dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">message</span> <span class="pre">(dict)</span> <span class="pre">-></span> <span class="pre">dict</span></code> – this entry is called is called with a message, usually from a client. A <code class="docutils literal notranslate"><span class="pre">dict</span></code> is expected to be returned.</dt><dd><p>The plugin should attach to this entry when wanting to exchange messages with a client or another plugin.</p>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="summary">
<h2>Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<p class="rubric">Meta</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">BackupApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Backup the application</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CheckPluginUpdate</span></code>(*args, **kwargs)</p></td>
<td><p>Check for new plugin release</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CheckUpdate</span></code>(*args, **kwargs)</p></td>
<td><p>Check for new release</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ClientLogger</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">InitApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Initialize the appplication</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Notification</span></code>(*args, **kwargs)</p></td>
<td><p>Notify client</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ReIndex</span></code>(*args, **kwargs)</p></td>
<td><p>Trigger a reindex</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">RemoveCommandFilter</span></code>(*args, **kwargs)</p></td>
<td><p>Remove a callable to a pipeline command</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">RestartApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Restart the appplication</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">RestoreApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Restore the application from a backup</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ShutdownApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Shutdown the appplication</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">TrashSweeper</span></code>(*args, **kwargs)</p></td>
<td><p>Sweeps trashed items</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdateApplication</span></code>(*args, **kwargs)</p></td>
<td><p>Check for new release and update the application</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdatePlugin</span></code>(*args, **kwargs)</p></td>
<td><p>Check for new release and update a plugin</p></td>
</tr>
</tbody>
</table>
<p class="rubric">I/O</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CacheCleaner</span></code>(*args, **kwargs)</p></td>
<td><p>Clean the provided folder</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CoreFS</span></code>([path, archive])</p></td>
<td><p>Encapsulates path on the filesystem</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DeletePath</span></code>(*args, **kwargs)</p></td>
<td><p>Delete path or database item files from filesystem</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSCreatedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSDeletedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSDirCreatedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSDirDeletedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSDirModifiedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSDirMovedEvent</span></code>([is_dir, src, dest, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSEvent</span></code>([name, is_dir, src])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSFileCreatedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSFileDeletedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSFileModifiedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSFileMovedEvent</span></code>([is_dir, src, dest, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSModifiedEvent</span></code>([is_dir, src, name])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FSMovedEvent</span></code>([is_dir, src, name, dest])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GalleryFS</span></code>(path_or_dbitem[, ensure_in_session])</p></td>
<td><p>Encapsulates an gallery object on the filesystem :type path_or_dbitem: <code class="xref py py-data docutils literal notranslate"><span class="pre">Union</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">Gallery</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">CoreFS</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">Path</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">PathItem</span></code>] :param path_or_dbitem: path to a valid gallery archive/folder, a <code class="xref py py-class docutils literal notranslate"><span class="pre">PathItem</span></code> or a <code class="xref py py-class docutils literal notranslate"><span class="pre">db.Gallery</span></code> database item</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetImage</span></code>(*args, **kwargs)</p></td>
<td><p>Generate an image from source image</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.io_cmd.ImageProperties" title="happypanda.core.commands.io_cmd.ImageProperties"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ImageProperties</span></code></a>([size, radius, output_dir, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ItemTextParser</span></code>(name)</p></td>
<td><p>Extract several components from a gallery name (usually a filename)</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">PathItem</span></code>(item, path, related)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">PathMatch</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">WatchDir</span></code>(*args, **kwargs)</p></td>
<td><p>Watch a directory for file system changes</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Database</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DeleteItem</span></code>(*args, **kwargs)</p></td>
<td><p>Delete a database item</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetDatabaseModel</span></code>(*args, **kwargs)</p></td>
<td><p>Get database model item by name</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetDatabaseSort</span></code>(*args, **kwargs)</p></td>
<td><p>Returns a name or, a namedtuple(expr, joins) of a data sort expression and additional tables to join, for a given sort index</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetModelHash</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetModelImage</span></code>(*args, **kwargs)</p></td>
<td><p>Fetch a database model item’s image</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetModelItems</span></code>(*args, **kwargs)</p></td>
<td><p>Fetch model items from the database</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetSession</span></code>(*args, **kwargs)</p></td>
<td><p>Get a database session</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MostCommonTags</span></code>(*args, **kwargs)</p></td>
<td><p>Get the most common tags for item</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdateItem</span></code>(*args, **kwargs)</p></td>
<td><p>Update database items</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdateItemData</span></code>(*args, **kwargs)</p></td>
<td><p>Update a database item’s attribute</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Item</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetItemLog</span></code>(*args, **kwargs)</p></td>
<td><p>Get logs for item</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ItemWatcher</span></code>(*args, **kwargs)</p></td>
<td><p>Watches a specified directory for supported items</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItem</span></code>(*args, **kwargs)</p></td>
<td><p>Log a message for item</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItemCritical</span></code>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around LogItem</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItemDebug</span></code>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around LogItem</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItemError</span></code>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around LogItem</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItemInfo</span></code>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around LogItem</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LogItemWarning</span></code>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around LogItem</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MoveItem</span></code>(*args, **kwargs)</p></td>
<td><p>Move database item files on filesystem</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SetItemConfig</span></code>(*args, **kwargs)</p></td>
<td><p>Set/update configuration for item</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdateGalleryProgress</span></code>(*args, **kwargs)</p></td>
<td><p>Update a GalleryProgress</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">db_item_key</span></code>(item_id, model)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Gallery</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">OpenGallery</span></code>(*args, **kwargs)</p></td>
<td><p>Open a gallery in an external viewer</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ScanGallery</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SimilarGallery</span></code>(*args, **kwargs)</p></td>
<td><p>Get a list of similar galleries to given gallery</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SyncWithSource</span></code>(*args, **kwargs)</p></td>
<td><p>Synchronise the gallery source with the database, meaning if the source is a path on the filesystem, it will rescan the source for any possibly new items for given item.</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Item Data</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ArtistData</span></code>([item, names, info, galleries, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ArtistNameData</span></code>([item, name, artist_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ArtistUserDataData</span></code>([item, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">BaseData</span></code>()</p></td>
<td><p>Base Data</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CategoryData</span></code>([item, galleries, name, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CircleData</span></code>([item, artists, galleries, name, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CollectionData</span></code>([item, info, pub_date, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">CollectionUserDataData</span></code>([item, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">EventData</span></code>([item, item_id, by_table, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">FilterData</span></code>([item, name, user, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GalleryData</span></code>([item, last_read, pub_date, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GalleryProgressData</span></code>([item, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GalleryUserDataData</span></code>([item, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GroupingData</span></code>([item, status_id, timestamp, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">HashData</span></code>([item, type, name, id, timestamp, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LanguageData</span></code>([item, code, galleries, name, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetaListData</span></code>([item, name, id, timestamp, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetaTagData</span></code>([item, is_user_data, name, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">NamespaceData</span></code>([item, tags, name, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">NamespaceTagData</span></code>([item, tag_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">NamespaceTagUserDataData</span></code>([item, user_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">NotSet</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Op</span></code>(value)</p></td>
<td><p>Base operation</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">PageData</span></code>([item, number, name, path, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">PageUserDataData</span></code>([item, user_id, parent_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ParodyData</span></code>([item, names, galleries, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ParodyNameData</span></code>([item, name, parody_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ProfileData</span></code>([item, path, data, size, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Remove</span></code>(value)</p></td>
<td><p>A remove operation</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Set</span></code>(value)</p></td>
<td><p>An append operation</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">StatusData</span></code>([item, groupings, name, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">TagData</span></code>([item, namespaces, name, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">TaggableData</span></code>([item, tags, last_updated, id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">TitleData</span></code>([item, name, language_id, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UrlData</span></code>([item, name, id, timestamp, user, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UserData</span></code>([item, name, role, address, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">yData</span></code>([item, name, id, timestamp, user, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">artist_preferred_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">base_id_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">filter_search_validate</span></code>(obj, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">gallery_preferred_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">gallery_rating_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">gallery_times_read_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_data_class</span></code>(db_cls)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">hashtype_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">metatags_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">plugin_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">tags_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">trash_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">user_right_add_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">user_right_remove_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">user_right_update_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">userdata_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">userrole_validate</span></code>(self, attr, value)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Login</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetLoginSession</span></code>(*args, **kwargs)</p></td>
<td><p>Get the login session if logged in, else None</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetLoginStatus</span></code>(*args, **kwargs)</p></td>
<td><p>Check if user is logged in</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetLoginText</span></code>(*args, **kwargs)</p></td>
<td><p>Get login status text</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Login</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LoginInfo</span></code>([identifier, name, parser, sites, …])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Metadata</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Metadata</span></code>(*args, **kwargs)</p></td>
<td><p>Fetch metadata</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetadataData</span></code>(metadataitem[, title, url, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetadataInfo</span></code>([identifier, name, parser, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetadataItem</span></code>(item[, url, options])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">MetadataResult</span></code>(data, status[, reason])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Search</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">Index</span></code>(*args, **kwargs)</p></td>
<td><p>Index data</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">IndexData</span></code>(touched[, action, index, indexes])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">LegacyPartialModelFilter</span></code>(*args, **kwargs)</p></td>
<td><p>Perform a partial search on database model with a single term</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ModelFilter</span></code>(*args, **kwargs)</p></td>
<td><p>Perform a full search on database model</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ParseSearch</span></code>(*args, **kwargs)</p></td>
<td><p>Parse a search query.</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">ParseTerm</span></code>(*args, **kwargs)</p></td>
<td><p>Parse a single term</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">SearchToESearch</span></code>(*args, **kwargs)</p></td>
<td><p>Convert a list of ns:tag from ParseSearch to an ESearch query.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#happypanda.core.commands.search_cmd.Term" title="happypanda.core.commands.search_cmd.Term"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Term</span></code></a>(namespace, tag, operator, exclusion)</p></td>
<td><p>used to encapsulate a single term, e.g: <code class="docutils literal notranslate"><span class="pre">pages::>5</span></code> where <code class="docutils literal notranslate"><span class="pre">pages</span></code> is the namespace, <code class="docutils literal notranslate"><span class="pre">></span></code> is the operator and <code class="docutils literal notranslate"><span class="pre">5</span></code> is the tag</p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">UpdateFilters</span></code>(*args, **kwargs)</p></td>
<td><p>Update filters</p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_search_options</span></code>()</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">nest_query</span></code>(inner_query, path[, nested, index])</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<p class="rubric">Network</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.Method" title="happypanda.core.commands.network_cmd.Method"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Method</span></code></a>(value)</p></td>
<td><p>An enumeration.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.MultiGETRequest" title="happypanda.core.commands.network_cmd.MultiGETRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiGETRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around MultiRequest for GET requests</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.MultiPOSTRequest" title="happypanda.core.commands.network_cmd.MultiPOSTRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiPOSTRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around MultiRequest for POST requests</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.MultiRequest" title="happypanda.core.commands.network_cmd.MultiRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MultiRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>Make multiple HTTP requests</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.RequestProperties" title="happypanda.core.commands.network_cmd.RequestProperties"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RequestProperties</span></code></a>([method, name, session, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.Response" title="happypanda.core.commands.network_cmd.Response"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Response</span></code></a>(*args, **kwargs)</p></td>
<td><p>A request response.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.SingleGETRequest" title="happypanda.core.commands.network_cmd.SingleGETRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SingleGETRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around SingleRequest for GET requests</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.SinglePOSTRequest" title="happypanda.core.commands.network_cmd.SinglePOSTRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SinglePOSTRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>A convenience wrapper around SingleRequest for POST requests</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#happypanda.core.commands.network_cmd.SingleRequest" title="happypanda.core.commands.network_cmd.SingleRequest"><code class="xref py py-obj docutils literal notranslate"><span class="pre">SingleRequest</span></code></a>(*args, **kwargs)</p></td>
<td><p>Make a HTTP request</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Download</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DownloadInfo</span></code>([identifier, name, parser, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DownloadItem</span></code>(url[, options, name, type, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DownloadRequest</span></code>(downloaditem, url[, type, …])</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DownloadResource</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">DownloadResult</span></code>(downloaditem, requests, status)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">GetDownloadInfo</span></code>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="module-happypanda.core.commands.meta_cmd">
<span id="commands"></span><h2>Commands<a class="headerlink" href="#module-happypanda.core.commands.meta_cmd" title="Permalink to this headline">¶</a></h2>
<div class="section" id="meta">
<h3>.Meta<a class="headerlink" href="#meta" title="Permalink to this headline">¶</a></h3>
</div>
<div class="admonition error">
<p class="admonition-title">Error</p>
<p>happypanda.core.commands.meta_cmd</p>