pypipr 1.0.126__py3-none-any.whl → 1.0.128__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.
pypipr/__init__.py CHANGED
@@ -1,4 +1,3 @@
1
- from .APIMixinView import APIMixinView
2
1
  from .ComparePerformance import ComparePerformance
3
2
  from .LINUX import LINUX
4
3
  from .PintUreg import PintUreg
pypipr/choices.py CHANGED
@@ -20,11 +20,14 @@ def get_choices(prompt):
20
20
 
21
21
  def filter_choices(contains, daftar):
22
22
  if contains.isdigit():
23
- daftar = get_by_index(daftar, int(contains))
23
+ # daftar = get_by_index(daftar, int(contains))
24
+ daftar = [v for i, v in enumerate(daftar) if contains in str(i)]
24
25
  else:
25
26
  daftar = [v for v in daftar if contains in v]
26
- if len(daftar) == 1:
27
- daftar = get_by_index(daftar, 0)
27
+
28
+ if len(daftar) == 1:
29
+ daftar = get_by_index(daftar, 0)
30
+
28
31
  return daftar
29
32
 
30
33
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypipr
3
- Version: 1.0.126
3
+ Version: 1.0.128
4
4
  Summary: The Python Package Index Project
5
5
  Author: ufiapjj
6
6
  Author-email: ufiapjj@gmail.com
@@ -248,8 +248,8 @@ iprint(irange("z", "a", 4))
248
248
 
249
249
  Output:
250
250
  ```py
251
- <generator object int_range at 0x7a10b00440>
252
- <generator object int_range at 0x7a10b00440>
251
+ <generator object int_range at 0x76b1e5f740>
252
+ <generator object int_range at 0x76b1e5f740>
253
253
  [13, 12, 11, 10, 9, 8, 7, 6]
254
254
  [2, 5, 8]
255
255
  [2, 5, 8]
@@ -281,7 +281,7 @@ print(list(batchmaker(s)))
281
281
 
282
282
  Output:
283
283
  ```py
284
- <generator object batchmaker at 0x7a10af8280>
284
+ <generator object batchmaker at 0x76b1b59c60>
285
285
  ['Urutan 1 dan 10 dan j dan Z saja.', 'Urutan 1 dan 10 dan j dan K saja.', 'Urutan 4 dan 10 dan j dan Z saja.', 'Urutan 4 dan 10 dan j dan K saja.']
286
286
  ```
287
287
 
@@ -335,7 +335,7 @@ print(list(batch_calculate("{1 10} m ** {1 3}")))
335
335
 
336
336
  Output:
337
337
  ```py
338
- <generator object batch_calculate at 0x7a10a73010>
338
+ <generator object batch_calculate at 0x76b1b69f30>
339
339
  [('1 m ** 1', <Quantity(1, 'meter')>), ('1 m ** 2', <Quantity(1, 'meter ** 2')>), ('2 m ** 1', <Quantity(2, 'meter')>), ('2 m ** 2', <Quantity(2, 'meter ** 2')>), ('3 m ** 1', <Quantity(3, 'meter')>), ('3 m ** 2', <Quantity(3, 'meter ** 2')>), ('4 m ** 1', <Quantity(4, 'meter')>), ('4 m ** 2', <Quantity(4, 'meter ** 2')>), ('5 m ** 1', <Quantity(5, 'meter')>), ('5 m ** 2', <Quantity(5, 'meter ** 2')>), ('6 m ** 1', <Quantity(6, 'meter')>), ('6 m ** 2', <Quantity(6, 'meter ** 2')>), ('7 m ** 1', <Quantity(7, 'meter')>), ('7 m ** 2', <Quantity(7, 'meter ** 2')>), ('8 m ** 1', <Quantity(8, 'meter')>), ('8 m ** 2', <Quantity(8, 'meter ** 2')>), ('9 m ** 1', <Quantity(9, 'meter')>), ('9 m ** 2', <Quantity(9, 'meter ** 2')>)]
340
340
  ```
341
341
 
@@ -458,7 +458,7 @@ print(list(chunk_array(arr, 5)))
458
458
 
459
459
  Output:
460
460
  ```py
461
- <generator object chunk_array at 0x7a10b00440>
461
+ <generator object chunk_array at 0x76b1e5f740>
462
462
  [[2, 3, 12, 3, 3], [42, 42, 1, 43, 2], [42, 41, 4, 24, 32], [42, 3, 12, 32, 42], [42]]
463
463
  ```
464
464
 
@@ -509,9 +509,9 @@ print(datetime_now("Etc/GMT+7"))
509
509
 
510
510
  Output:
511
511
  ```py
512
- 2024-05-06 17:58:05.473000+07:00
513
- 2024-05-06 10:58:05.475089+00:00
514
- 2024-05-06 03:58:05.482857-07:00
512
+ 2024-05-07 20:13:38.464929+07:00
513
+ 2024-05-07 13:13:38.466964+00:00
514
+ 2024-05-07 06:13:38.471350-07:00
515
515
  ```
516
516
 
517
517
  ## dict_first
@@ -617,7 +617,7 @@ iprint(filter_empty(var))
617
617
 
618
618
  Output:
619
619
  ```py
620
- <generator object filter_empty at 0x7a10a715d0>
620
+ <generator object filter_empty at 0x76b1b69c60>
621
621
  [1, '0', True, {}, ['eee']]
622
622
  ```
623
623
 
@@ -647,8 +647,8 @@ print(list(get_class_method(ExampleGetClassMethod)))
647
647
 
648
648
  Output:
649
649
  ```py
650
- <generator object get_class_method at 0x7a10a732e0>
651
- [<function ExampleGetClassMethod.a at 0x7a10b151c0>, <function ExampleGetClassMethod.b at 0x7a10b15080>, <function ExampleGetClassMethod.c at 0x7a10b15120>, <function ExampleGetClassMethod.d at 0x7a10b15260>]
650
+ <generator object get_class_method at 0x76b1b6a200>
651
+ [<function ExampleGetClassMethod.a at 0x76b1bb9c60>, <function ExampleGetClassMethod.b at 0x76b1bb9bc0>, <function ExampleGetClassMethod.c at 0x76b1bb9a80>, <function ExampleGetClassMethod.d at 0x76b1bb9d00>]
652
652
  ```
653
653
 
654
654
  ## get_filesize
@@ -937,7 +937,7 @@ Output:
937
937
 
938
938
  ## ienumerate
939
939
 
940
- `ienumerate(iterator, start=0, key=<function int_to_int at 0x7a19f09a80>)`
940
+ `ienumerate(iterator, start=0, key=<function int_to_int at 0x76b8281120>)`
941
941
 
942
942
  meningkatkan fungsi enumerate() pada python
943
943
  untuk key menggunakan huruf dan basis angka lainnya.
@@ -950,7 +950,7 @@ iprint(ienumerate(it, key=int_to_chr))
950
950
 
951
951
  Output:
952
952
  ```py
953
- <generator object ienumerate at 0x7a10a733d0>
953
+ <generator object ienumerate at 0x76b1b6a2f0>
954
954
  [('a', 'ini'), ('b', 'contoh'), ('c', 'enumerator')]
955
955
  ```
956
956
 
@@ -1017,7 +1017,7 @@ print(ijoin(10, ' '))
1017
1017
 
1018
1018
  Output:
1019
1019
  ```py
1020
- dfs, weq, qweqw, asd
1020
+ weq, qweqw, asd, dfs
1021
1021
  ,ini,path,seperti,url,
1022
1022
  ini,path,seperti,url
1023
1023
  <li>satu</li>
@@ -1062,119 +1062,119 @@ pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
1062
1062
  Output:
1063
1063
  ```py
1064
1064
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1065
- [['Harga Emas Hari Ini - Senin, 06 Mei 2024'],
1066
- ['Spot Emas USD2.319,91 (+17,34) / oz',
1067
- 'Kurs IDR↓16.094,00 (-108,00) / USD',
1068
- 'Emas IDR1.200.401 (+977) / gr'],
1069
- ['LM Antam (Jual)1.310.000 (-3.000) / gr',
1070
- 'LM Antam (Beli)1.203.000 (-3.000) / gr']],
1065
+ [['Harga Emas Hari Ini - Selasa, 07 Mei 2024'],
1066
+ ['Spot Emas USD2.319,63 (-4,02) / oz',
1067
+ 'Kurs IDR↓16.025,01 (-68,99) / USD',
1068
+ 'Emas IDR1.195.111 (-7.225) / gr'],
1069
+ ['LM Antam (Jual)1.318.000 (+8.000) / gr',
1070
+ 'LM Antam (Beli)1.210.000 (+7.000) / gr']],
1071
1071
  [['Harga Emas Hari Ini'],
1072
1072
  ['Gram', 'Gedung Antam Jakarta', 'Pegadaian'],
1073
1073
  ['per Gram (Rp)', 'per Batangan (Rp)', 'per Gram (Rp)', 'per Batangan (Rp)'],
1074
1074
  ['1000',
1075
- '1.251 (-3)',
1076
- '1.250.600 (-3.000)',
1075
+ '1.259 (+8)',
1076
+ '1.258.600 (+8.000)',
1077
1077
  '1.043.040 (+8.200)',
1078
1078
  '1.043.040.000 (+8.200.000)'],
1079
1079
  ['500',
1080
- '2.501 (-6)',
1081
- '1.250.640 (-3.000)',
1080
+ '2.517 (+16)',
1081
+ '1.258.640 (+8.000)',
1082
1082
  '1.043.082 (+8.200)',
1083
1083
  '521.541.000 (+4.100.000)'],
1084
1084
  ['250',
1085
- '5.004 (-12)',
1086
- '1.251.060 (-3.000)',
1085
+ '5.036 (+32)',
1086
+ '1.259.060 (+8.000)',
1087
1087
  '1.043.512 (+8.200)',
1088
1088
  '260.878.000 (+2.050.000)'],
1089
1089
  ['100',
1090
- '12.521 (-30)',
1091
- '1.252.120 (-3.000)',
1090
+ '12.601 (+80)',
1091
+ '1.260.120 (+8.000)',
1092
1092
  '1.044.600 (+8.200)',
1093
1093
  '104.460.000 (+820.000)'],
1094
1094
  ['50',
1095
- '25.058 (-60)',
1096
- '1.252.900 (-3.000)',
1095
+ '25.218 (+160)',
1096
+ '1.260.900 (+8.000)',
1097
1097
  '1.045.400 (+8.200)',
1098
1098
  '52.270.000 (+410.000)'],
1099
1099
  ['25',
1100
- '50.179 (-120)',
1101
- '1.254.480 (-3.000)',
1100
+ '50.499 (+320)',
1101
+ '1.262.480 (+8.000)',
1102
1102
  '1.047.040 (+8.200)',
1103
1103
  '26.176.000 (+205.000)'],
1104
1104
  ['10',
1105
- '125.950 (-300)',
1106
- '1.259.500 (-3.000)',
1105
+ '126.750 (+800)',
1106
+ '1.267.500 (+8.000)',
1107
1107
  '1.052.200 (+8.200)',
1108
1108
  '10.522.000 (+82.000)'],
1109
1109
  ['5',
1110
- '253.000 (-600)',
1111
- '1.265.000 (-3.000)',
1110
+ '254.600 (+1.600)',
1111
+ '1.273.000 (+8.000)',
1112
1112
  '1.057.800 (+8.200)',
1113
1113
  '5.289.000 (+41.000)'],
1114
1114
  ['3',
1115
- '423.889 (-1.000)',
1116
- '1.271.667 (-3.000)',
1115
+ '426.556 (+2.667)',
1116
+ '1.279.667 (+8.000)',
1117
1117
  '1.064.667 (+8.000)',
1118
1118
  '3.194.000 (+24.000)'],
1119
1119
  ['2',
1120
- '640.000 (-1.500)',
1121
- '1.280.000 (-3.000)',
1120
+ '644.000 (+4.000)',
1121
+ '1.288.000 (+8.000)',
1122
1122
  '1.073.500 (+8.500)',
1123
1123
  '2.147.000 (+17.000)'],
1124
1124
  ['1',
1125
- '1.310.000 (-3.000)',
1126
- '1.310.000 (-3.000)',
1125
+ '1.318.000 (+8.000)',
1126
+ '1.318.000 (+8.000)',
1127
1127
  '1.104.000 (+8.000)',
1128
1128
  '1.104.000 (+8.000)'],
1129
1129
  ['0.5',
1130
- '2.820.000 (-6.000)',
1131
- '1.410.000 (-3.000)',
1130
+ '2.836.000 (+16.000)',
1131
+ '1.418.000 (+8.000)',
1132
1132
  '1.208.000 (+8.000)',
1133
1133
  '604.000 (+4.000)'],
1134
- ['Update harga LM Antam :06 Mei 2024, pukul 08:30Harga pembelian kembali '
1135
- ':Rp. 1.203.000/gram (-3.000)',
1134
+ ['Update harga LM Antam :07 Mei 2024, pukul 08:23Harga pembelian kembali '
1135
+ ':Rp. 1.210.000/gram (+7.000)',
1136
1136
  'Update harga LM Pegadaian :31 Agustus 2023']],
1137
1137
  [['Spot Harga Emas Hari Ini (Market Open)'],
1138
1138
  ['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
1139
- ['Ounce\xa0(oz)', '2.319,91 (+17,34)', '16.094,00 (-108,00)', '37.336.632'],
1140
- ['Gram\xa0(gr)', '74,59', '16.094,00', '1.200.401 (+977)'],
1141
- ['Kilogram\xa0(kg)', '74.586,84', '16.094,00', '1.200.400.580'],
1142
- ['Update harga emas :06 Mei 2024, pukul 17:58Update kurs :06 Mei 2024, pukul '
1139
+ ['Ounce\xa0(oz)', '2.319,63 (-4,02)', '16.025,01 (-68,99)', '37.172.094'],
1140
+ ['Gram\xa0(gr)', '74,58', '16.025,01', '1.195.111 (-7.225)'],
1141
+ ['Kilogram\xa0(kg)', '74.577,84', '16.025,01', '1.195.110.573'],
1142
+ ['Update harga emas :07 Mei 2024, pukul 20:13Update kurs :07 Mei 2024, pukul '
1143
1143
  '13:10']],
1144
1144
  [['Gram', 'UBS Gold 99.99%'],
1145
1145
  ['Jual', 'Beli'],
1146
1146
  ['/ Batang', '/ Gram', '/ Batang', '/ Gram'],
1147
1147
  ['100',
1148
- '124.800.000 (-1.200.000)',
1149
- '1.248.000 (-12.000)',
1150
- '122.685.000 (-700.000)',
1151
- '1.226.850 (-7.000)'],
1148
+ '126.000.000 (+1.200.000)',
1149
+ '1.260.000 (+12.000)',
1150
+ '123.135.000 (+450.000)',
1151
+ '1.231.350 (+4.500)'],
1152
1152
  ['50',
1153
- '62.500.000 (-450.000)',
1154
- '1.250.000 (-9.000)',
1155
- '61.395.000 (-350.000)',
1156
- '1.227.900 (-7.000)'],
1153
+ '62.900.000 (+400.000)',
1154
+ '1.258.000 (+8.000)',
1155
+ '61.620.000 (+225.000)',
1156
+ '1.232.400 (+4.500)'],
1157
1157
  ['25',
1158
- '31.300.000 (-200.000)',
1159
- '1.252.000 (-8.000)',
1160
- '30.800.000 (-175.000)',
1161
- '1.232.000 (-7.000)'],
1158
+ '31.500.000 (+200.000)',
1159
+ '1.260.000 (+8.000)',
1160
+ '30.912.500 (+112.500)',
1161
+ '1.236.500 (+4.500)'],
1162
1162
  ['10',
1163
- '12.570.000 (-80.000)',
1164
- '1.257.000 (-8.000)',
1165
- '12.370.000 (-70.000)',
1166
- '1.237.000 (-7.000)'],
1163
+ '12.650.000 (+80.000)',
1164
+ '1.265.000 (+8.000)',
1165
+ '12.415.000 (+45.000)',
1166
+ '1.241.500 (+4.500)'],
1167
1167
  ['5',
1168
- '6.310.000 (-40.000)',
1169
- '1.262.000 (-8.000)',
1170
- '6.237.000 (-35.000)',
1171
- '1.247.400 (-7.000)'],
1168
+ '6.350.000 (+40.000)',
1169
+ '1.270.000 (+8.000)',
1170
+ '6.259.500 (+22.500)',
1171
+ '1.251.900 (+4.500)'],
1172
1172
  ['1',
1173
- '1.310.000 (-5.000)',
1174
- '1.310.000 (-5.000)',
1175
- '1.280.000 (-7.000)',
1176
- '1.280.000 (-7.000)'],
1177
- ['', 'Update :06 Mei 2024, pukul 11:07']],
1173
+ '1.315.000 (+5.000)',
1174
+ '1.315.000 (+5.000)',
1175
+ '1.284.500 (+4.500)',
1176
+ '1.284.500 (+4.500)'],
1177
+ ['', 'Update :07 Mei 2024, pukul 11:17']],
1178
1178
  [['Konversi Satuan'],
1179
1179
  ['Satuan', 'Ounce (oz)', 'Gram (gr)', 'Kilogram (kg)'],
1180
1180
  ['Ounce\xa0(oz)', '1', '31,1034767696', '0,0311034768'],
@@ -1184,37 +1184,37 @@ Output:
1184
1184
  ['Waktu', 'Emas'],
1185
1185
  ['Unit', 'USD', 'IDR'],
1186
1186
  ['Angka', '+/-', 'Angka', '+/-'],
1187
- ['Hari Ini', 'Kurs', '', '', '16.202', '-108-0,67%'],
1188
- ['oz', '2.302,57', '+17,34+0,75%', '37.306.239', '+30.392+0,08%'],
1189
- ['gr', '74,03', '+0,56+0,75%', '1.199.423', '+977+0,08%'],
1190
- ['30 Hari', 'Kurs', '', '', '15.907', '+187+1,18%'],
1191
- ['oz', '2.329,93', '-10,02-0,43%', '37.062.197', '+274.435+0,74%'],
1192
- ['gr', '74,91', '-0,32-0,43%', '1.191.577', '+8.823+0,74%'],
1193
- ['2 Bulan', 'Kurs', '', '', '15.723', '+371+2,36%'],
1194
- ['oz', '2.156,44', '+163,47+7,58%', '33.905.706', '+3.430.925+10,12%'],
1195
- ['gr', '69,33', '+5,26+7,58', '1.090.094', '+110.307+10,12%'],
1196
- ['6 Bulan', 'Kurs', '', '', '15.593', '+501+3,21%'],
1197
- ['oz', '1.954,36', '+365,55+18,70%', '30.474.335', '+6.862.296+22,52%'],
1198
- ['gr', '62,83', '+11,75+18,70%', '979.773', '+220.628+22,52%'],
1199
- ['1 Tahun', 'Kurs', '', '', '15.731', '+363+2,31%'],
1200
- ['oz', '1.823,86', '+496,05+27,20%', '28.691.142', '+8.645.490+30,13%'],
1201
- ['gr', '58,64', '+15,95+27,20%', '922.442', '+277.959+30,13%'],
1202
- ['2 Tahun', 'Kurs', '', '', '14.418', '+1.676+11,62%'],
1203
- ['oz', '1.883,86', '+436,05+23,15%', '27.161.493', '+10.175.138+37,46%'],
1204
- ['gr', '60,57', '+14,02+23,15%', '873.262', '+327.138+37,46%'],
1205
- ['3 Tahun', 'Kurs', '', '', '14.364', '+1.730+12,04%'],
1206
- ['oz', '1.831,48', '+488,43+26,67%', '26.307.379', '+11.029.253+41,92%'],
1207
- ['gr', '58,88', '+15,70+26,67%', '845.802', '+354.599+41,92%'],
1208
- ['5 Tahun', 'Kurs', '', '', '14.305', '+1.789+12,51%'],
1209
- ['oz', '1.280,40', '+1.039,51+81,19%', '18.316.122', '+19.020.510+103,85%'],
1210
- ['gr', '41,17', '+33,42+81,19%', '588.877', '+611.524+103,85%']])
1187
+ ['Hari Ini', 'Kurs', '', '', '16.094', '-69-0,43%'],
1188
+ ['oz', '2.323,65', '-4,02-0,17%', '37.396.823', '-224.729-0,60%'],
1189
+ ['gr', '74,71', '-0,13-0,17%', '1.202.336', '-7.225-0,60%'],
1190
+ ['30 Hari', 'Kurs', '', '', '15.907', '+118+0,74%'],
1191
+ ['oz', '2.329,93', '-10,30-0,44%', '37.062.197', '+109.897+0,30%'],
1192
+ ['gr', '74,91', '-0,33-0,44%', '1.191.577', '+3.533+0,30%'],
1193
+ ['2 Bulan', 'Kurs', '', '', '15.658', '+367+2,34%'],
1194
+ ['oz', '2.179,67', '+139,96+6,42%', '34.129.273', '+3.042.821+8,92%'],
1195
+ ['gr', '70,08', '+4,50+6,42', '1.097.282', '+97.829+8,92%'],
1196
+ ['6 Bulan', 'Kurs', '', '', '15.629', '+396+2,53%'],
1197
+ ['oz', '1.960,90', '+358,73+18,29%', '30.646.906', '+6.525.188+21,29%'],
1198
+ ['gr', '63,04', '+11,53+18,29%', '985.321', '+209.790+21,29%'],
1199
+ ['1 Tahun', 'Kurs', '', '', '15.731', '+294+1,87%'],
1200
+ ['oz', '1.823,86', '+495,77+27,18%', '28.691.142', '+8.480.952+29,56%'],
1201
+ ['gr', '58,64', '+15,94+27,18%', '922.442', '+272.669+29,56%'],
1202
+ ['2 Tahun', 'Kurs', '', '', '14.418', '+1.607+11,15%'],
1203
+ ['oz', '1.883,86', '+435,77+23,13%', '27.161.493', '+10.010.600+36,86%'],
1204
+ ['gr', '60,57', '+14,01+23,13%', '873.262', '+321.848+36,86%'],
1205
+ ['3 Tahun', 'Kurs', '', '', '14.364', '+1.661+11,56%'],
1206
+ ['oz', '1.831,43', '+488,20+26,66%', '26.306.661', '+10.865.433+41,30%'],
1207
+ ['gr', '58,88', '+15,70+26,66%', '845.779', '+349.332+41,30%'],
1208
+ ['5 Tahun', 'Kurs', '', '', '14.338', '+1.687+11,77%'],
1209
+ ['oz', '1.284,03', '+1.035,60+80,65%', '18.410.422', '+18.761.672+101,91%'],
1210
+ ['gr', '41,28', '+33,30+80,65%', '591.909', '+603.202+101,91%']])
1211
1211
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1212
1212
  [[''],
1213
1213
  ['Emas 24 KaratHarga Emas 1 Gram', ''],
1214
- ['USD', '74,59↑', '+0,56+0,76%'],
1215
- ['KURS', '16.035,65↑', '+66,95+0,42%'],
1216
- ['IDR', '1.196.048,44↑', '+13.896,04+1,18%'],
1217
- ['Senin, 06 Mei 2024 17:58']],
1214
+ ['USD', '74,58↓', '-0,13-0,17%'],
1215
+ ['KURS', '16.057,20↑', '+13,30+0,08%'],
1216
+ ['IDR', '1.197.511,23↓', '-1.081,73-0,09%'],
1217
+ ['Selasa, 07 Mei 2024 20:13']],
1218
1218
  [[''],
1219
1219
  ['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
1220
1220
  'Hari Ini',
@@ -1225,19 +1225,19 @@ Output:
1225
1225
  '']],
1226
1226
  [['Pergerakkan Harga Emas 1 Gram'],
1227
1227
  ['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
1228
- ['USD', '74,03', '74,03 - 74,59', '74,31'],
1229
- ['KURS', '15.968,70', '15.968,70 - 16.035,65', '16.002,18'],
1230
- ['IDR', '1.182.152,40', '1.182.152,40 - 1.196.048,44', '1.189.100,42'],
1228
+ ['USD', '74,71', '74,58 - 74,71', '74,65'],
1229
+ ['KURS', '16.043,90', '16.043,90 - 16.057,20', '16.050,55'],
1230
+ ['IDR', '1.198.592,96', '1.197.511,23 - 1.198.592,96', '1.198.052,10'],
1231
1231
  [''],
1232
1232
  ['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
1233
- ['USD', '66,32', '64,07 - 77,14', '+8,27 (12,47%)'],
1234
- ['KURS', '15.390,10', '15.390,00 - 16.307,80', '+645,55 (4,19%)'],
1235
- ['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+175.318,91 (17,18%)'],
1233
+ ['USD', '66,32', '64,07 - 77,14', '+8,26 (12,45%)'],
1234
+ ['KURS', '15.390,10', '15.390,00 - 16.307,80', '+667,10 (4,33%)'],
1235
+ ['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+176.781,70 (17,32%)'],
1236
1236
  [''],
1237
1237
  ['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
1238
- ['USD', '64,87', '58,43 - 77,14', '+9,72 (14,98%)'],
1239
- ['KURS', '14.669,40', '14.674,80 - 16.307,80', '+1.366,25 (9,31%)'],
1240
- ['IDR', '951.626,36', '912.925,68 - 1.256.829,06', '+244.422,08 (25,68%)']])
1238
+ ['USD', '64,84', '58,43 - 77,14', '+9,74 (15,02%)'],
1239
+ ['KURS', '14.674,80', '14.674,80 - 16.307,80', '+1.382,40 (9,42%)'],
1240
+ ['IDR', '951.570,92', '912.925,68 - 1.256.829,06', '+245.940,31 (25,85%)']])
1241
1241
  ```
1242
1242
 
1243
1243
  ## iloads
@@ -1367,7 +1367,7 @@ Output:
1367
1367
  ```py
1368
1368
  8
1369
1369
  ['mana', 'aja']
1370
- [<Element a at 0x7a10b09810>, <Element a at 0x7a10b4d040>, <Element a at 0x7a10b4d0e0>, <Element a at 0x7a10b4d130>, <Element a at 0x7a10b4d180>, <Element a at 0x7a10b4d1d0>, <Element a at 0x7a10b4d220>, <Element a at 0x7a10b4d270>, <Element a at 0x7a10b4d2c0>, <Element a at 0x7a10b4d310>, <Element a at 0x7a10b4d360>, <Element a at 0x7a10b4d3b0>, <Element a at 0x7a10b4d400>, <Element a at 0x7a10b4d450>, <Element a at 0x7a10b4d4a0>, <Element a at 0x7a10b4d4f0>, <Element a at 0x7a10b4d540>, <Element a at 0x7a10b4d590>]
1370
+ [<Element a at 0x76b1babd40>, <Element a at 0x76b1bfa260>, <Element a at 0x76b1bfa300>, <Element a at 0x76b1bfa350>, <Element a at 0x76b1bfa3a0>, <Element a at 0x76b1bfa3f0>, <Element a at 0x76b1bfa440>, <Element a at 0x76b1bfa490>, <Element a at 0x76b1bfa4e0>, <Element a at 0x76b1bfa530>, <Element a at 0x76b1bfa580>, <Element a at 0x76b1bfa5d0>, <Element a at 0x76b1bfa620>, <Element a at 0x76b1bfa670>, <Element a at 0x76b1bfa6c0>, <Element a at 0x76b1bfa710>, <Element a at 0x76b1bfa760>, <Element a at 0x76b1bfa7b0>]
1371
1371
  False
1372
1372
  ```
1373
1373
 
@@ -1429,7 +1429,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
1429
1429
 
1430
1430
  Output:
1431
1431
  ```py
1432
- <generator object iscandir at 0x7a10b00740>
1432
+ <generator object iscandir at 0x76b1e5fa40>
1433
1433
  [PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
1434
1434
  ```
1435
1435
 
@@ -1462,81 +1462,80 @@ iprint(ivars(__import__('pypipr')))
1462
1462
 
1463
1463
  Output:
1464
1464
  ```py
1465
- {'class': {'APIMixinView': <class 'pypipr.APIMixinView.APIMixinView'>,
1466
- 'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
1465
+ {'function': {'avg': <function avg at 0x76c059fb00>,
1466
+ 'get_filemtime': <function get_filemtime at 0x76b848bd80>,
1467
+ 'print_colorize': <function print_colorize at 0x76b848bf60>,
1468
+ 'print_log': <function print_log at 0x76b848be20>,
1469
+ 'console_run': <function console_run at 0x76b848bec0>,
1470
+ 'auto_reload': <function auto_reload at 0x76ba00b2e0>,
1471
+ 'basename': <function basename at 0x76b848bce0>,
1472
+ 'chr_to_int': <function chr_to_int at 0x76b8490540>,
1473
+ 'int_to_chr': <function int_to_chr at 0x76b84905e0>,
1474
+ 'irange': <function irange at 0x76b8490860>,
1475
+ 'batchmaker': <function batchmaker at 0x76b8490220>,
1476
+ 'calculate': <function calculate at 0x76b8490360>,
1477
+ 'batch_calculate': <function batch_calculate at 0x76b84900e0>,
1478
+ 'bin_to_int': <function bin_to_int at 0x76b8490180>,
1479
+ 'is_empty': <function is_empty at 0x76b8491080>,
1480
+ 'exit_if_empty': <function exit_if_empty at 0x76b8490f40>,
1481
+ 'input_char': <function input_char at 0x76b84904a0>,
1482
+ 'get_by_index': <function get_by_index at 0x76b8491120>,
1483
+ 'choices': <function choices at 0x76b8491300>,
1484
+ 'chunk_array': <function chunk_array at 0x76b84913a0>,
1485
+ 'create_folder': <function create_folder at 0x76b8491440>,
1486
+ 'datetime_from_string': <function datetime_from_string at 0x76b84914e0>,
1487
+ 'datetime_now': <function datetime_now at 0x76b8491580>,
1488
+ 'dict_first': <function dict_first at 0x76b8493740>,
1489
+ 'dirname': <function dirname at 0x76b84937e0>,
1490
+ 'is_iterable': <function is_iterable at 0x76b84939c0>,
1491
+ 'to_str': <function to_str at 0x76b8493a60>,
1492
+ 'filter_empty': <function filter_empty at 0x76b8493880>,
1493
+ 'get_class_method': <function get_class_method at 0x76b8493920>,
1494
+ 'get_filesize': <function get_filesize at 0x76b8493ba0>,
1495
+ 'github_init': <function github_init at 0x76b8493c40>,
1496
+ 'github_pull': <function github_pull at 0x76b8493ce0>,
1497
+ 'github_push': <function github_push at 0x76b8493e20>,
1498
+ 'github_user': <function github_user at 0x76b8493ec0>,
1499
+ 'hex_to_int': <function hex_to_int at 0x76b8493f60>,
1500
+ 'iargv': <function iargv at 0x76b8214040>,
1501
+ 'idumps_html': <function idumps_html at 0x76b82142c0>,
1502
+ 'idumps': <function idumps at 0x76b8214180>,
1503
+ 'int_to_int': <function int_to_int at 0x76b8281120>,
1504
+ 'ienumerate': <function ienumerate at 0x76b824b4c0>,
1505
+ 'ienv': <function ienv at 0x76b8280fe0>,
1506
+ 'iexec': <function iexec at 0x76b82811c0>,
1507
+ 'ijoin': <function ijoin at 0x76b8281300>,
1508
+ 'iloads_html': <function iloads_html at 0x76b82814e0>,
1509
+ 'iloads': <function iloads at 0x76c0fea660>,
1510
+ 'int_to_bin': <function int_to_bin at 0x76b8281260>,
1511
+ 'int_to_hex': <function int_to_hex at 0x76b8281440>,
1512
+ 'int_to_oct': <function int_to_oct at 0x76b8281580>,
1513
+ 'is_valid_url': <function is_valid_url at 0x76b8281760>,
1514
+ 'iopen': <function iopen at 0x76b82ecf40>,
1515
+ 'iprint': <function iprint at 0x76b82816c0>,
1516
+ 'ireplace': <function ireplace at 0x76b8281a80>,
1517
+ 'iscandir': <function iscandir at 0x76b819e2a0>,
1518
+ 'isplit': <function isplit at 0x76b819e340>,
1519
+ 'ivars': <function ivars at 0x76b819e3e0>,
1520
+ 'log': <function log at 0x76b819e480>,
1521
+ 'oct_to_int': <function oct_to_int at 0x76b819e520>,
1522
+ 'password_generator': <function password_generator at 0x76b819e5c0>,
1523
+ 'pip_freeze_without_version': <function pip_freeze_without_version at 0x76b819e700>,
1524
+ 'poetry_publish': <function poetry_publish at 0x76b819e7a0>,
1525
+ 'poetry_update_version': <function poetry_update_version at 0x76b819e8e0>,
1526
+ 'print_dir': <function print_dir at 0x76b819eac0>,
1527
+ 'print_to_last_line': <function print_to_last_line at 0x76b819eb60>,
1528
+ 'random_bool': <function random_bool at 0x76b819ec00>,
1529
+ 'restart': <function restart at 0x76b819eca0>,
1530
+ 'set_timeout': <function set_timeout at 0x76b819ed40>,
1531
+ 'sets_ordered': <function sets_ordered at 0x76b819ede0>,
1532
+ 'str_cmp': <function str_cmp at 0x76b819ee80>,
1533
+ 'text_colorize': <function text_colorize at 0x76b819ef20>},
1534
+ 'class': {'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
1467
1535
  'PintUregQuantity': <class 'pint.Quantity'>,
1468
1536
  'RunParallel': <class 'pypipr.RunParallel.RunParallel'>},
1469
- 'function': {'avg': <function avg at 0x7a1db6e700>,
1470
- 'get_filemtime': <function get_filemtime at 0x7a1a016de0>,
1471
- 'print_colorize': <function print_colorize at 0x7a1a016fc0>,
1472
- 'print_log': <function print_log at 0x7a1a0ceb60>,
1473
- 'console_run': <function console_run at 0x7a1a016e80>,
1474
- 'auto_reload': <function auto_reload at 0x7a19ff7ec0>,
1475
- 'basename': <function basename at 0x7a1a016d40>,
1476
- 'chr_to_int': <function chr_to_int at 0x7a1a017560>,
1477
- 'int_to_chr': <function int_to_chr at 0x7a1a017600>,
1478
- 'irange': <function irange at 0x7a1a017880>,
1479
- 'batchmaker': <function batchmaker at 0x7a1a017240>,
1480
- 'calculate': <function calculate at 0x7a1a017380>,
1481
- 'batch_calculate': <function batch_calculate at 0x7a1a017100>,
1482
- 'bin_to_int': <function bin_to_int at 0x7a1a0171a0>,
1483
- 'is_empty': <function is_empty at 0x7a19e38040>,
1484
- 'exit_if_empty': <function exit_if_empty at 0x7a1a017ec0>,
1485
- 'input_char': <function input_char at 0x7a1a017f60>,
1486
- 'get_by_index': <function get_by_index at 0x7a19e380e0>,
1487
- 'choices': <function choices at 0x7a19e382c0>,
1488
- 'chunk_array': <function chunk_array at 0x7a19e38360>,
1489
- 'create_folder': <function create_folder at 0x7a19e38400>,
1490
- 'datetime_from_string': <function datetime_from_string at 0x7a19e384a0>,
1491
- 'datetime_now': <function datetime_now at 0x7a19e38540>,
1492
- 'dict_first': <function dict_first at 0x7a19e385e0>,
1493
- 'dirname': <function dirname at 0x7a19e38680>,
1494
- 'is_iterable': <function is_iterable at 0x7a19e38860>,
1495
- 'to_str': <function to_str at 0x7a19e38900>,
1496
- 'filter_empty': <function filter_empty at 0x7a19e38720>,
1497
- 'get_class_method': <function get_class_method at 0x7a19e387c0>,
1498
- 'get_filesize': <function get_filesize at 0x7a19e38a40>,
1499
- 'github_init': <function github_init at 0x7a19e38b80>,
1500
- 'github_pull': <function github_pull at 0x7a19e38ae0>,
1501
- 'github_push': <function github_push at 0x7a19e38cc0>,
1502
- 'github_user': <function github_user at 0x7a19e38d60>,
1503
- 'hex_to_int': <function hex_to_int at 0x7a19e38e00>,
1504
- 'iargv': <function iargv at 0x7a19e38ea0>,
1505
- 'idumps_html': <function idumps_html at 0x7a19e39120>,
1506
- 'idumps': <function idumps at 0x7a19e38fe0>,
1507
- 'int_to_int': <function int_to_int at 0x7a19f09a80>,
1508
- 'ienumerate': <function ienumerate at 0x7a19e39620>,
1509
- 'ienv': <function ienv at 0x7a19e3b1a0>,
1510
- 'iexec': <function iexec at 0x7a19f09b20>,
1511
- 'ijoin': <function ijoin at 0x7a19f09c60>,
1512
- 'iloads_html': <function iloads_html at 0x7a19f09e40>,
1513
- 'iloads': <function iloads at 0x7a19f09bc0>,
1514
- 'int_to_bin': <function int_to_bin at 0x7a19f09da0>,
1515
- 'int_to_hex': <function int_to_hex at 0x7a19f09ee0>,
1516
- 'int_to_oct': <function int_to_oct at 0x7a19f09f80>,
1517
- 'is_valid_url': <function is_valid_url at 0x7a19f0a160>,
1518
- 'iopen': <function iopen at 0x7a19d125c0>,
1519
- 'iprint': <function iprint at 0x7a19f0a0c0>,
1520
- 'ireplace': <function ireplace at 0x7a19d12700>,
1521
- 'iscandir': <function iscandir at 0x7a19dc9d00>,
1522
- 'isplit': <function isplit at 0x7a19dc9da0>,
1523
- 'ivars': <function ivars at 0x7a19dc9e40>,
1524
- 'log': <function log at 0x7a19dc9ee0>,
1525
- 'oct_to_int': <function oct_to_int at 0x7a19dc9f80>,
1526
- 'password_generator': <function password_generator at 0x7a19dca020>,
1527
- 'pip_freeze_without_version': <function pip_freeze_without_version at 0x7a19dca160>,
1528
- 'poetry_publish': <function poetry_publish at 0x7a19dca200>,
1529
- 'poetry_update_version': <function poetry_update_version at 0x7a19dca340>,
1530
- 'print_dir': <function print_dir at 0x7a19dca520>,
1531
- 'print_to_last_line': <function print_to_last_line at 0x7a19dca5c0>,
1532
- 'random_bool': <function random_bool at 0x7a19dca660>,
1533
- 'restart': <function restart at 0x7a19dca700>,
1534
- 'set_timeout': <function set_timeout at 0x7a19dca7a0>,
1535
- 'sets_ordered': <function sets_ordered at 0x7a19dca840>,
1536
- 'str_cmp': <function str_cmp at 0x7a19dca8e0>,
1537
- 'text_colorize': <function text_colorize at 0x7a19dca980>},
1538
1537
  'variable': {'LINUX': True,
1539
- 'PintUreg': <pint.registry.UnitRegistry object at 0x7a1db70850>,
1538
+ 'PintUreg': <pint.registry.UnitRegistry object at 0x76c05e9fd0>,
1540
1539
  'WINDOWS': False},
1541
1540
  'module': {'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
1542
1541
  'colorama': <module 'colorama' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/colorama/__init__.py'>,
@@ -1626,7 +1625,7 @@ print(password_generator())
1626
1625
 
1627
1626
  Output:
1628
1627
  ```py
1629
- Z[ElVvWE
1628
+ g4]hYy]l
1630
1629
  ```
1631
1630
 
1632
1631
  ## pip_freeze_without_version
@@ -1684,7 +1683,7 @@ Output:
1684
1683
  __enter__ : https:/www.google.com
1685
1684
  __fspath__ : https:/www.google.com
1686
1685
  __getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
1687
- __hash__ : -6368168625464002048
1686
+ __hash__ : -7337099340815294686
1688
1687
  __init__ : None
1689
1688
  __init_subclass__ : None
1690
1689
  __module__ : pathlib
@@ -1697,8 +1696,8 @@ Output:
1697
1696
  _cached_cparts : ['https:', 'www.google.com']
1698
1697
  _cparts : ['https:', 'www.google.com']
1699
1698
  _drv :
1700
- _flavour : <pathlib._PosixFlavour object at 0x7a25714dd0>
1701
- _hash : -6368168625464002048
1699
+ _flavour : <pathlib._PosixFlavour object at 0x76c038d190>
1700
+ _hash : -7337099340815294686
1702
1701
  _parts : ['https:', 'www.google.com']
1703
1702
  _root :
1704
1703
  _str : https:/www.google.com
@@ -1720,7 +1719,7 @@ Output:
1720
1719
  is_reserved : False
1721
1720
  is_socket : False
1722
1721
  is_symlink : False
1723
- iterdir : <generator object Path.iterdir at 0x7a10af2a40>
1722
+ iterdir : <generator object Path.iterdir at 0x76b1bc5b60>
1724
1723
  joinpath : https:/www.google.com
1725
1724
  name : www.google.com
1726
1725
  parent : https:
@@ -1794,7 +1793,7 @@ x.cancel()
1794
1793
 
1795
1794
  Output:
1796
1795
  ```py
1797
- <Timer(Thread-2, started 524237651184)>
1796
+ <Timer(Thread-2, started 509765205232)>
1798
1797
  menghentikan timeout 7
1799
1798
  ```
1800
1799
 
@@ -1812,7 +1811,7 @@ print(list(sets_ordered(array)))
1812
1811
 
1813
1812
  Output:
1814
1813
  ```py
1815
- <generator object sets_ordered at 0x7a10b24fb0>
1814
+ <generator object sets_ordered at 0x76b9fdd700>
1816
1815
  [2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
1817
1816
  ```
1818
1817
 
@@ -1847,31 +1846,6 @@ text_colorize("Print some text", color=colorama.Fore.RED)
1847
1846
 
1848
1847
  # CLASS
1849
1848
 
1850
- ## APIMixinView
1851
-
1852
- `APIMixinView()`
1853
-
1854
- APIView adalah class view untuk membuat Website API
1855
-
1856
- Cara kerjanya adalah dengan menggunakan variabel GET
1857
- untuk menerima data.
1858
- Cara ini dipilih untuk menghindari CORS protection.
1859
-
1860
- Key dan value dari parameter get akan disimpan
1861
- dalam variabel dictionary APIDict yg bisa langsung
1862
- diakses.
1863
-
1864
- Class ini tidak bisa digunakan sendiri.
1865
- Class ini harus menjadi mixin Class View karena
1866
- perlu trigger untuk memanggil method get().
1867
-
1868
-
1869
- ```py
1870
- class ExampleTodoAddView(APIMixinView, View):
1871
- def process_data(self, *args, **kwargs):
1872
- return TodoModel.objects.create(**self.APIDict)
1873
- ```
1874
-
1875
1849
  ## ComparePerformance
1876
1850
 
1877
1851
  `ComparePerformance()`
@@ -1907,15 +1881,15 @@ print(ExampleComparePerformance().compare_performance())
1907
1881
 
1908
1882
  Output:
1909
1883
  ```py
1910
- {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x7a10b24ad0>,
1884
+ {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x76b9fdd630>,
1911
1885
  'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
1912
1886
  'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
1913
1887
  'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
1914
- {'a': 130, 'b': 132, 'c': 100, 'd': 191}
1915
- {'a': 107, 'b': 141, 'c': 100, 'd': 198}
1916
- {'a': 107, 'b': 131, 'c': 100, 'd': 163}
1917
- {'a': 109, 'b': 124, 'c': 100, 'd': 151}
1918
- {'a': 105, 'b': 130, 'c': 100, 'd': 153}
1888
+ {'a': 100, 'b': 107, 'c': 105, 'd': 159}
1889
+ {'a': 125, 'b': 135, 'c': 100, 'd': 177}
1890
+ {'a': 123, 'b': 129, 'c': 100, 'd': 176}
1891
+ {'a': 108, 'b': 123, 'c': 100, 'd': 148}
1892
+ {'a': 113, 'b': 128, 'c': 100, 'd': 152}
1919
1893
  ```
1920
1894
 
1921
1895
  ## PintUregQuantity
@@ -1,11 +1,10 @@
1
- pypipr/APIMixinView.py,sha256=VxfxcGX3wWji3_g2UCUp-mqmofpLeMFz8MEy02_U-yw,1375
2
1
  pypipr/ComparePerformance.py,sha256=PeeBF1agcUN1P-4j8djrmtQWga8wr5QosJ6yaeoJOzI,2229
3
2
  pypipr/LINUX.py,sha256=XF5CR2imyRv8hGQpsDLDs_RU8xsD1aZLpFldEzP-mkU,77
4
3
  pypipr/PintUreg.py,sha256=_jmHZhUn8AcgFkXvZ6OTsWnjtp-CYcXUJ-dG_QdcARY,222
5
4
  pypipr/PintUregQuantity.py,sha256=ErSZKB-GHShi1zKac30XgFdBwAUrxMo80IQzIjQ2HVc,118
6
5
  pypipr/RunParallel.py,sha256=3H6sVSeUSATQQsWBcDGTtaXuc-12Yc0XmDyVtsg3PMA,5992
7
6
  pypipr/WINDOWS.py,sha256=NMW-94lzdqwfEWv2lF_i2GcSHJFDwWjccFufpymg4-E,83
8
- pypipr/__init__.py,sha256=7_bBcDP-U2L97edsnE1EpaNk47yE3hpdC1BBmCvtd-o,3144
7
+ pypipr/__init__.py,sha256=qmZSMlW57rXz82raQFW_TDPvbrdY7mbauYFkHh4Y5CY,3105
9
8
  pypipr/__terminal__.py,sha256=N_NEXa0V5QLb-dkP1Vp_fYKNjE4jGTqkiYNwPPOXZtw,1412
10
9
  pypipr/auto_reload.py,sha256=FGchFBjQs_eT7CmOMLNYoch-17q7ySFOnPx5z1kbH3E,918
11
10
  pypipr/avg.py,sha256=wUtX3x8dgLoODhQLyMB-HRMVo8Ha2yz3cp7lgcUNbr0,218
@@ -14,7 +13,7 @@ pypipr/batch_calculate.py,sha256=JoaciQk7j-nXSdqlwonRdZ3Qu6uqUYhuA7oxpTC548s,503
14
13
  pypipr/batchmaker.py,sha256=y0D-fU0oCJsdffwZZyJMC0iLPjjiv-_43a7hLrChJDM,1110
15
14
  pypipr/bin_to_int.py,sha256=9s935sdD-CC1d7WCsNO3dd8nqTfC8lpkxHB1zQ--mZc,191
16
15
  pypipr/calculate.py,sha256=uSmDH43_x4ifdHN23PLdWKqjx023--1ZE6mf5A2hqg4,696
17
- pypipr/choices.py,sha256=CFS5mfRdGvGmyGa3luwcc2iZf5AM_lYRP0s1i5Rad0U,1457
16
+ pypipr/choices.py,sha256=_Wehpw4Bozuy121F4QHy8pCPxlMa3Uvkt-0QjBINh7g,1530
18
17
  pypipr/choices.py.bak,sha256=hjVToqAIeMoMfL3kJxOERAicEVsQyUGwzbnorhLdMA4,1664
19
18
  pypipr/chr_to_int.py,sha256=5ETJZag1eM8wa2ceIGsmNP-jNufC5bCScghTLcwGEAI,459
20
19
  pypipr/chunk_array.py,sha256=aodjp-daihl-Xd8kPqcpHZICZub7Jx0QBqyoF0bd0dY,385
@@ -77,7 +76,7 @@ pypipr/sets_ordered.py,sha256=ve2Nc1eNYD_7QaTf_4otEAvzL1XpZP2MjX0KHSXF5nA,325
77
76
  pypipr/str_cmp.py,sha256=2kavWiT4VTddXcBotF1CxDOWSygk5rFrbllKxBjw9dc,377
78
77
  pypipr/text_colorize.py,sha256=IVjaCnXBSBu4Rh8pTO3CxDvxpA265HVwyKX_-PRXCcI,396
79
78
  pypipr/to_str.py,sha256=vSuspf-ZQldf4enkssa9XH0WMjkmWug51G9ia0K5occ,597
80
- pypipr-1.0.126.dist-info/METADATA,sha256=RPW8EgfzFu4bHQeoouK5Ae9ZBNCVtnhHPcsLt5OlDDs,53404
81
- pypipr-1.0.126.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
- pypipr-1.0.126.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
83
- pypipr-1.0.126.dist-info/RECORD,,
79
+ pypipr-1.0.128.dist-info/METADATA,sha256=-JmCM5AnHgwZlQds5xO-zY69z47ZkziikG6l89iOGqE,52684
80
+ pypipr-1.0.128.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
81
+ pypipr-1.0.128.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
82
+ pypipr-1.0.128.dist-info/RECORD,,
pypipr/APIMixinView.py DELETED
@@ -1,48 +0,0 @@
1
- from django.http.response import HttpResponse
2
-
3
-
4
- class APIMixinView:
5
- """
6
- APIView adalah class view untuk membuat Website API
7
-
8
- Cara kerjanya adalah dengan menggunakan variabel GET
9
- untuk menerima data.
10
- Cara ini dipilih untuk menghindari CORS protection.
11
-
12
- Key dan value dari parameter get akan disimpan
13
- dalam variabel dictionary APIDict yg bisa langsung
14
- diakses.
15
-
16
- Class ini tidak bisa digunakan sendiri.
17
- Class ini harus menjadi mixin Class View karena
18
- perlu trigger untuk memanggil method get().
19
-
20
-
21
- ```py
22
- class ExampleTodoAddView(APIMixinView, View):
23
- def process_data(self, *args, **kwargs):
24
- return TodoModel.objects.create(**self.APIDict)
25
- ```
26
- """
27
-
28
- APIDict = {}
29
-
30
- def get(self, *args, **kwargs):
31
- self.get_data(*args, **kwargs)
32
- if self.process_data(*args, **kwargs):
33
- return self.success(*args, **kwargs)
34
- return self.failure(*args, **kwargs)
35
-
36
- def get_data(self, *args, **kwargs):
37
- iterator = self.APIDict or self.request.GET
38
- for k, v in iterator.items():
39
- self.APIDict[k] = self.request.GET.get(k, v)
40
-
41
- def process_data(self, *args, **kwargs):
42
- return True
43
-
44
- def success(self, *args, **kwargs):
45
- return HttpResponse(status=200)
46
-
47
- def failure(self, *args, **kwargs):
48
- return HttpResponse(status=500)