forked from NURDspace/nurdbar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·527 lines (480 loc) · 27.2 KB
/
index.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
<!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>Welcome to NurdBar’s documentation! — NurdBar 0.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</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="top" title="NurdBar 0.1 documentation" href="#" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li><a href="#">NurdBar 0.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="welcome-to-nurdbar-s-documentation">
<h1>Welcome to NurdBar’s documentation!<a class="headerlink" href="#welcome-to-nurdbar-s-documentation" title="Permalink to this headline">¶</a></h1>
<div class="section" id="getting-started">
<h2>Getting started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
<p>Copy the nurdbar_sample.cfg to your configuration file (nurdbar.cfg for example). Adjust the serial port and db uri configuration parameters.
Any database which can be used with sqlalchemy can be used, but the database specific python library needs to be installed.</p>
<p>Run “start.py <configfile>” to start the daemon with all interfaceplugins. By default the Telnet interface and Barcode interface are available,
which monitor telnet commands and a serial port for scanned barcodes respectively and act upon them.
See tests/example.py for some example code. To run the example.py as-is, you need socat, which can tie virtual serial ports together,
so you can write data to one, which is received by another virtual serial port.</p>
</div>
<div class="section" id="module-nurdbar">
<span id="nurdbar"></span><h2>NurdBar<a class="headerlink" href="#module-nurdbar" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="nurdbar.NurdBar">
<em class="property">class </em><tt class="descclassname">nurdbar.</tt><tt class="descname">NurdBar</tt><big>(</big><em>configfile='nurdbar.cfg'</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar" title="Permalink to this definition">¶</a></dt>
<dd><p>The main NurdBar API. Use this API to interact with the bar. Plugins receive an instance of this class, so they can interact with the bar.</p>
<dl class="method">
<dt id="nurdbar.NurdBar.addItem">
<tt class="descname">addItem</tt><big>(</big><em>barcode</em>, <em>buy_price</em>, <em>sell_price=None</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.addItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Add an Item to the bar.</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>barcode</strong> (<em>str</em>) – The barcode of the new Item</li>
<li><strong>buy_price</strong> (<em>float</em>) – The price for which the Item is bought by the bar</li>
<li><strong>sell_price</strong> (<em>float</em>) – The price by which the Item is sold by the bar (defaults to buy_price)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">model.Member</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.addMember">
<tt class="descname">addMember</tt><big>(</big><em>barcode</em>, <em>nick</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.addMember" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a member to the bar.</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>barcode</strong> (<em>str</em>) – The barcode of the new member</li>
<li><strong>nick</strong> (<em>str</em>) – The Nick of the member</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">model.Member</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getAvailableItemByBarcode">
<tt class="descname">getAvailableItemByBarcode</tt><big>(</big><em>barcode</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getAvailableItemByBarcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the first available (stock>0) Item by barcode. If several items with the same barcode are available, the oldest available Item is returned.</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>barcode</strong> (<em>str</em>) – The barcode for which to get the Item.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">nurdbar.model.Item</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getBalance">
<tt class="descname">getBalance</tt><big>(</big><em>member</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getBalance" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the balance for the member</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>member</strong> (<a class="reference internal" href="#nurdbar.model.Member" title="nurdbar.model.Member"><em>nurdbar.model.Member</em></a>) – The member for which to get the balance</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">float</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getBarcodeType">
<tt class="descname">getBarcodeType</tt><big>(</big><em>barcode</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getBarcodeType" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the type of barcode.</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>barcode</strong> (<em>str</em>) – The barcode to check</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">BarcodeTypes – Constant for the type of barcode.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getItemByBarcode">
<tt class="descname">getItemByBarcode</tt><big>(</big><em>barcode</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getItemByBarcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Get an Item by it’s barcode. Whether or not it is in stock, is not taken into account. The oldest item is returned.</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>barcode</strong> (<em>str</em>) – The barcode of the Item to get.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">nurdbar.model.Item</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getItemByBarcodePrice">
<tt class="descname">getItemByBarcodePrice</tt><big>(</big><em>barcode</em>, <em>buy_price</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getItemByBarcodePrice" title="Permalink to this definition">¶</a></dt>
<dd><p>Get an Item by it’s barcode and buy_price. Whether or not it is in stock, is not taken into account.</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>barcode</strong> (<em>str</em>) – The barcode of the Item to get.</li>
<li><strong>buy_price</strong> (<em>float</em>) – The buy_price of the Item to get.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">nurdbar.model.Item</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.getTransactions">
<tt class="descname">getTransactions</tt><big>(</big><em>member</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.getTransactions" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all transactions for Member</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>member</strong> (<a class="reference internal" href="#nurdbar.model.Member" title="nurdbar.model.Member"><em>nurdbar.model.Member</em></a>) – The model.Member object for which to get the transactions</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">[nurdbar.model.Member]</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.giveItem">
<tt class="descname">giveItem</tt><big>(</big><em>member_barcode</em>, <em>item_barcode</em>, <em>buy_price=None</em>, <em>amount=1</em>, <em>sell_price=None</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.giveItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Give an item, or on other words, sell something to the bar/add stock. This both changes the stock of the item being given, and changes the balance for the Member giving the item.
If the Item already exists (with the same buy_price), this item is used. If the Item is new, a new Item is stored in the database.
If the Member is unkown, ValueError is raised.</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>member_barcode</strong> (<em>str</em>) – The barcode of the Member giving the Item.</li>
<li><strong>item_barcode</strong> (<em>str</em>) – The barcode fo the Item being given.</li>
<li><strong>buy_price</strong> (<em>float</em>) – The buy price (for which the bar buys it) of the item being given</li>
<li><strong>amount</strong> (<em>int</em>) – The amount of Items being given</li>
<li><strong>sell_price</strong> (<em>float</em>) – The sell price (for which the bar buys it) of the item being given. It defaults to the buy_price</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">nurdbar.model.Transaction</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">ValueError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.handleBarcode">
<tt class="descname">handleBarcode</tt><big>(</big><em>barcode</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.handleBarcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Handle the reception of a barcode. The barcode type is checked, and the state of previously received barcodes is checked. If a sane combination of barcodes is
received, act upon them.</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>barcode</strong> (<em>str</em>) – the received barcode.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.payAmount">
<tt class="descname">payAmount</tt><big>(</big><em>member</em>, <em>amount</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.payAmount" title="Permalink to this definition">¶</a></dt>
<dd><p>Pay an amount to the bar.</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 last simple">
<li><strong>member</strong> (<em>model.Member</em>) – The member for which a payment is being done</li>
<li><strong>amount</strong> (<em>float</em>) – The amount being paid</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="nurdbar.NurdBar.takeItem">
<tt class="descname">takeItem</tt><big>(</big><em>member_barcode</em>, <em>item_barcode</em>, <em>amount=1</em><big>)</big><a class="headerlink" href="#nurdbar.NurdBar.takeItem" title="Permalink to this definition">¶</a></dt>
<dd><p>Take an Item from the bar. In other words: buy something. This both changes the stock of the Item, and the balance of the Member taking the Item.
If multiple Items with the same barcode but different buy_price exist, the oldest Item is sold first untill it stock runs out, then the next-oldest Item will be sold, etc.
If no stock is present, or the Member is unkown, a ValueError will be raised.</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>member_barcode</strong> (<em>str</em>) – The barcode of the Member giving the Item.</li>
<li><strong>item_barcode</strong> (<em>str</em>) – The barcode fo the Item being given.</li>
<li><strong>amount</strong> (<em>int</em>) – The amount of Items being given</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">nurdbar.model.Transaction</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">ValueError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-nurdbar.plugins.api">
<span id="nurdbar-plugins-api"></span><h2>nurdbar.plugins.api<a class="headerlink" href="#module-nurdbar.plugins.api" title="Permalink to this headline">¶</a></h2>
<p>The Nurdbar application uses plugins to register interfaces to the bar. This way, multiple interfaces can be used for the same bar application.
By default a Telnet interface is available, allowing the manipulation of the bar through telnet, and a barcode monitor interface, which monitors
a serial port on the local machine for scanned barcodes.</p>
<p>To register a new plugin, write your code, put it in the plugindir as configured in the config file. To register the plugin, all you need to do
is decorate a method in your code with one of the following decorators.</p>
<dl class="function">
<dt id="nurdbar.plugins.api.TCPInterfacePlugin">
<tt class="descclassname">nurdbar.plugins.api.</tt><tt class="descname">TCPInterfacePlugin</tt><big>(</big><em>portnum</em><big>)</big><a class="headerlink" href="#nurdbar.plugins.api.TCPInterfacePlugin" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator to register an TCPInterfacePlugin.
Methods using this plugin need to return a twisted.internet.protocol.Factory instance, which handles a corresponding twisted.internet.protocol.Protocol class.
The method should accept an argument for a nurdbar.NurdBar instance, providing access to the nurdbar API.
See <a class="reference external" href="http://twistedmatrix.com/documents/12.2.0/core/howto/servers.html#auto6">http://twistedmatrix.com/documents/12.2.0/core/howto/servers.html#auto6</a> for more info</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>portnum</strong> (<em>int</em>) – the portnumber to listen on for connections</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="nurdbar.plugins.api.TransportInterfacePlugin">
<tt class="descclassname">nurdbar.plugins.api.</tt><tt class="descname">TransportInterfacePlugin</tt><big>(</big><em>function</em><big>)</big><a class="headerlink" href="#nurdbar.plugins.api.TransportInterfacePlugin" title="Permalink to this definition">¶</a></dt>
<dd><p>Decorator for TransportInterfacePlugin. Transport interfaces get their input through local sockets/files/ports. An example is the twisted.internet.serialport.SerialPort
transport which monitors a local serial port for information. Methods using this decorator should instantiate their own transport (using the supplied reactor, and don’t need to
return anything. They method should accept an argument for a nurdbar.NurdBar instance, providing access to the nurdbar API, and a reactor argument, needed for the transport.</p>
</dd></dl>
</div>
<div class="section" id="module-nurdbar.model">
<span id="nurdbar-model"></span><h2>nurdbar.model<a class="headerlink" href="#module-nurdbar.model" title="Permalink to this headline">¶</a></h2>
<p>The datamodel for the NurdBar. The datamodel is created using SQLAlchemy. Instances of each datamodel object represent a row.
Manipulation of the database can be done by instantiating and manipulating these objects.
For a first intro on SQLAlchemy see <a class="reference external" href="http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#querying">http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#querying</a></p>
<dl class="class">
<dt id="nurdbar.model.Member">
<em class="property">class </em><tt class="descclassname">nurdbar.model.</tt><tt class="descname">Member</tt><big>(</big><em>barcode</em>, <em>nick</em><big>)</big><a class="headerlink" href="#nurdbar.model.Member" title="Permalink to this definition">¶</a></dt>
<dd><p>Members represent the “customers” of the bar.</p>
<dl class="attribute">
<dt id="nurdbar.model.Member.allTransactions">
<tt class="descname">allTransactions</tt><a class="headerlink" href="#nurdbar.model.Member.allTransactions" title="Permalink to this definition">¶</a></dt>
<dd><p>All transactions of the member.</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.balance">
<tt class="descname">balance</tt><a class="headerlink" href="#nurdbar.model.Member.balance" title="Permalink to this definition">¶</a></dt>
<dd><p>The (financial) balance for the Member. It is dynamically calculated from the member’s (non-archived) transactions.</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.barcode">
<tt class="descname">barcode</tt><a class="headerlink" href="#nurdbar.model.Member.barcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Barcode of the Member.</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.creationDateTime">
<tt class="descname">creationDateTime</tt><a class="headerlink" href="#nurdbar.model.Member.creationDateTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Date the Member was created</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.lastModifiedDateTime">
<tt class="descname">lastModifiedDateTime</tt><a class="headerlink" href="#nurdbar.model.Member.lastModifiedDateTime" title="Permalink to this definition">¶</a></dt>
<dd><p>DateTime on which the Member was last modified</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.member_id">
<tt class="descname">member_id</tt><a class="headerlink" href="#nurdbar.model.Member.member_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Id of the member</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.negativeTransactions">
<tt class="descname">negativeTransactions</tt><a class="headerlink" href="#nurdbar.model.Member.negativeTransactions" title="Permalink to this definition">¶</a></dt>
<dd><p>The members (non-archived) negative transactions (items bought).</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.nick">
<tt class="descname">nick</tt><a class="headerlink" href="#nurdbar.model.Member.nick" title="Permalink to this definition">¶</a></dt>
<dd><p>Nick of the Member</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.positiveTransactions">
<tt class="descname">positiveTransactions</tt><a class="headerlink" href="#nurdbar.model.Member.positiveTransactions" title="Permalink to this definition">¶</a></dt>
<dd><p>The members (non-archived) positive transactions (items sold and payments).</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Member.transactions">
<tt class="descname">transactions</tt><a class="headerlink" href="#nurdbar.model.Member.transactions" title="Permalink to this definition">¶</a></dt>
<dd><p>The members (non-archived) transactions.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="nurdbar.model.Item">
<em class="property">class </em><tt class="descclassname">nurdbar.model.</tt><tt class="descname">Item</tt><big>(</big><em>barcode</em>, <em>buy_price</em>, <em>sell_price=None</em><big>)</big><a class="headerlink" href="#nurdbar.model.Item" title="Permalink to this definition">¶</a></dt>
<dd><p>All items that can be sold. When the NurdBar is initialized with fill_tables(), also an Item is instantiated for payments.</p>
<dl class="attribute">
<dt id="nurdbar.model.Item.barcode">
<tt class="descname">barcode</tt><a class="headerlink" href="#nurdbar.model.Item.barcode" title="Permalink to this definition">¶</a></dt>
<dd><p>Barcode of the item. The combination of barcode and buy_price should be unique (but the barcode itself does not have to be).</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.buy_price">
<tt class="descname">buy_price</tt><a class="headerlink" href="#nurdbar.model.Item.buy_price" title="Permalink to this definition">¶</a></dt>
<dd><p>Buy price of the Item (for which the Item was bought)</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.creationDateTime">
<tt class="descname">creationDateTime</tt><a class="headerlink" href="#nurdbar.model.Item.creationDateTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Creation DateTime of the Item.</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.item_id">
<tt class="descname">item_id</tt><a class="headerlink" href="#nurdbar.model.Item.item_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Id of the item (primary key)</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.lastModifiedDateTime">
<tt class="descname">lastModifiedDateTime</tt><a class="headerlink" href="#nurdbar.model.Item.lastModifiedDateTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Last modification DateTime of the Item.</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.sell_price">
<tt class="descname">sell_price</tt><a class="headerlink" href="#nurdbar.model.Item.sell_price" title="Permalink to this definition">¶</a></dt>
<dd><p>Sell price of the Item (for which the Item will be sold). Defaults to buy_price</p>
</dd></dl>
<dl class="attribute">
<dt id="nurdbar.model.Item.stock">
<tt class="descname">stock</tt><a class="headerlink" href="#nurdbar.model.Item.stock" title="Permalink to this definition">¶</a></dt>
<dd><p>The amount of the Item in stock (modified by creating transactions).</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="nurdbar.model.Transaction">
<em class="property">class </em><tt class="descclassname">nurdbar.model.</tt><tt class="descname">Transaction</tt><a class="headerlink" href="#nurdbar.model.Transaction" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Welcome to NurdBar’s documentation!</a><ul>
<li><a class="reference internal" href="#getting-started">Getting started</a></li>
<li><a class="reference internal" href="#module-nurdbar">NurdBar</a></li>
<li><a class="reference internal" href="#module-nurdbar.plugins.api">nurdbar.plugins.api</a></li>
<li><a class="reference internal" href="#module-nurdbar.model">nurdbar.model</a></li>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li><a href="#">NurdBar 0.1 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2013, Dolf Andringa.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>