memberjojo 3.0__py3-none-any.whl → 3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
memberjojo/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '3.0'
32
- __version_tuple__ = version_tuple = (3, 0)
31
+ __version__ = version = '3.2'
32
+ __version_tuple__ = version_tuple = (3, 2)
33
33
 
34
34
  __commit_id__ = commit_id = None
memberjojo/mojo_common.py CHANGED
@@ -354,12 +354,14 @@ class MojoSkel:
354
354
  self.cursor.execute(base_query, values)
355
355
  return [self._row_to_obj(row) for row in self.cursor.fetchall()]
356
356
 
357
- def run_count_query(self, sql: str, params: tuple):
357
+ def run_count_query(self, sql: str, params: tuple) -> int:
358
358
  """
359
359
  Generate whole sql query for running on db table for counting and run
360
360
 
361
361
  :param sql: the sqlite query for matching rows
362
362
  :param params: the paramaters to use for the query
363
+
364
+ :return: number of matching rows
363
365
  """
364
366
  sql_query = f"SELECT count (*) FROM {self.table_name} {sql}"
365
367
  cursor = self.cursor.execute(sql_query, params)
memberjojo/mojo_member.py CHANGED
@@ -63,15 +63,18 @@ class Member(MojoSkel):
63
63
  value = row[0]
64
64
  return str(value).lower() == "yes"
65
65
 
66
- def member_type_count(self, membership_type: str):
66
+ def member_type_count(self, membership_type: str) -> int:
67
67
  """
68
68
  Count members by membership type string
69
69
 
70
70
  :param membership_type: the string to match, can use percent to match
71
71
  remaining or preceeding text
72
+
72
73
  - Full (match only Full)
73
74
  - Full% (match Full and any words after)
74
75
  - %Full% ( match Full in the middle)
76
+
77
+ :return: Number of members that are `membership_type`
75
78
  """
76
79
  query = "WHERE membership LIKE ?"
77
80
  return self.run_count_query(query, (f"{membership_type}",))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memberjojo
3
- Version: 3.0
3
+ Version: 3.2
4
4
  Summary: memberjojo - tools for working with members.
5
5
  Author-email: Duncan Bellamy <dunk@denkimushi.com>
6
6
  Requires-Python: >=3.8
@@ -1,13 +1,13 @@
1
1
  memberjojo/__init__.py,sha256=kO0EB2VTfHQFyqERL0qKRlYzAkD_cTm-b3q3uT1r91g,343
2
- memberjojo/_version.py,sha256=5dvh8NEGPynimE4L7R3rRJScHS-KLrDLsbEL9spnkgw,699
2
+ memberjojo/_version.py,sha256=0NsA_uKYgH420BjPN2uJ4pgGTpqB3cTaYO7upyMemZE,699
3
3
  memberjojo/download.py,sha256=N8s5kFm58gbOaPyWvXxRigbMk5J6vjOx4_GX--JtWFY,4387
4
- memberjojo/mojo_common.py,sha256=n63QPXXruOHZWIdTLFJvOBZb484KuAsHApZfg7VBDOE,12320
4
+ memberjojo/mojo_common.py,sha256=RdZP-49RSPIPLWHpepWSgtxHUrB3xJfq1oFo0o2bSYs,12369
5
5
  memberjojo/mojo_loader.py,sha256=D8-jnNaFQ57O16drcLcAYHlLIe9-r6FKVKoTaK4Oaj4,11619
6
- memberjojo/mojo_member.py,sha256=UWQKJh_aEn5J1-Yb_7StijHf6JRiq2RnhMJzRos0prc,10981
6
+ memberjojo/mojo_member.py,sha256=9_0ljW6UyMKMGVLydYusI9teHFJNE_5WQ6D0G3fkM50,11052
7
7
  memberjojo/mojo_transaction.py,sha256=KCbhrY1Wccs_GoXHtuXgohn5MdxnUiMpKdhcVE348KU,933
8
8
  memberjojo/sql_query.py,sha256=4T6EVYZo7q0VQ2Ah6uuX20Ub_g0RsBoKs1qrZmqRK7w,185
9
9
  memberjojo/url.py,sha256=vx-l1FlrohlpAExPICU5UYRl34z_tYXvWLzGAaprdXI,2320
10
- memberjojo-3.0.dist-info/licenses/LICENSE,sha256=eaTLEca5OoRQ9r8GlC6Rwa1BormM3q-ppDWLFFxhQxI,1071
11
- memberjojo-3.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
12
- memberjojo-3.0.dist-info/METADATA,sha256=bFOpMMpcy4A_0PwrmzousoBu9tOQzR1YRUTxycqNmMg,3964
13
- memberjojo-3.0.dist-info/RECORD,,
10
+ memberjojo-3.2.dist-info/licenses/LICENSE,sha256=eaTLEca5OoRQ9r8GlC6Rwa1BormM3q-ppDWLFFxhQxI,1071
11
+ memberjojo-3.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
12
+ memberjojo-3.2.dist-info/METADATA,sha256=capfifUP7JbEDV9sSgTrf_enqlVc6s6deBjoK8lBlpY,3964
13
+ memberjojo-3.2.dist-info/RECORD,,