pypipr 1.0.75__py3-none-any.whl → 1.0.76__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
@@ -60,4 +60,27 @@ from .ifunctions.iprint import iprint
60
60
  from .ifunctions.irange import irange
61
61
  from .ifunctions.ireplace import ireplace
62
62
  from .ifunctions.iscandir import iscandir
63
- from .ifunctions.isplit import isplit
63
+ from .ifunctions.isplit import isplit
64
+ import colorama
65
+ import datetime
66
+ import inspect
67
+ import io
68
+ import json
69
+ import lxml
70
+ import math
71
+ import os
72
+ import pathlib
73
+ import pint
74
+ import pprint
75
+ import random
76
+ import re
77
+ import requests
78
+ import string
79
+ import subprocess
80
+ import sys
81
+ import textwrap
82
+ import time
83
+ import tzdata
84
+ import webbrowser
85
+ import yaml
86
+ import zoneinfo
@@ -3,9 +3,9 @@ def chunk_array(array, size, start=0):
3
3
  Membagi array menjadi potongan-potongan dengan besaran yg diinginkan
4
4
 
5
5
  ```python
6
- array = [2, 3, 12, 3, 3, 42, 42, 1, 43, 2, 42, 41, 4, 24, 32, 42, 3, 12, 32, 42, 42]
7
- print(chunck_array(array, 5))
8
- print(list(chunck_array(array, 5)))
6
+ arr = [2, 3, 12, 3, 3, 42, 42, 1, 43, 2, 42, 41, 4, 24, 32, 42, 3, 12, 32, 42, 42]
7
+ print(chunk_array(arr, 5))
8
+ print(list(chunk_array(arr, 5)))
9
9
  ```
10
10
  """
11
11
  for i in range(start, len(array), size):
@@ -17,6 +17,7 @@ def get_class_method(cls):
17
17
  return [x for x in range(10)]
18
18
 
19
19
  print(get_class_method(ExampleGetClassMethod))
20
+ print(list(get_class_method(ExampleGetClassMethod)))
20
21
  ```
21
22
  """
22
23
  for x in dir(cls):
@@ -5,10 +5,10 @@ def get_from_index(obj, index, on_error=None):
5
5
 
6
6
  ```python
7
7
  l = [1, 3, 5]
8
- print(pypipr.get_from_index(l, 7))
8
+ print(get_from_index(l, 7))
9
9
  ```
10
10
  """
11
11
  try:
12
12
  return obj[index]
13
- except Exception as e:
13
+ except Exception:
14
14
  return on_error
@@ -9,6 +9,7 @@ def print_dir(var, colorize=True):
9
9
  Print property dan method yang tersedia pada variabel
10
10
 
11
11
  ```python
12
+ import pathlib
12
13
  p = pathlib.Path("https://www.google.com/")
13
14
  print_dir(p, colorize=False)
14
15
  ```
@@ -6,7 +6,7 @@ def print_log(text):
6
6
  Akan melakukan print ke console.
7
7
  Berguna untuk memberikan informasi proses program yg sedang berjalan.
8
8
 
9
- ```py
9
+ ```python
10
10
  print_log("Standalone Log")
11
11
  ```
12
12
  """
@@ -9,7 +9,8 @@ def batch_calculate(pattern):
9
9
 
10
10
 
11
11
  ```python
12
- iprint(batch_calculate("{1 10} m ** {1 3}"))
12
+ print(batch_calculate("{1 10} m ** {1 3}"))
13
+ print(list(batch_calculate("{1 10} m ** {1 3}")))
13
14
  ```
14
15
  """
15
16
  patterns = batchmaker(pattern)
@@ -14,14 +14,14 @@ def iloads(data, syntax="yaml"):
14
14
  data = {
15
15
  'a': 123,
16
16
  't': ['disini', 'senang', 'disana', 'senang'],
17
- 'l': (12, 23, [12, 42])
17
+ 'l': (12, 23, [12, 42]),
18
18
  }
19
19
  s = idumps(data)
20
20
  print(iloads(s))
21
21
  ```
22
22
  """
23
23
  if syntax == "yaml":
24
- return yaml.safe_load(data)
24
+ return yaml.full_load(data)
25
25
  if syntax == "json":
26
26
  return json.load(data)
27
27
  if syntax == "html":
@@ -18,6 +18,7 @@ def iloads_html(html):
18
18
  apabila data berupa table maka dapat dicek type(data) -> html_table
19
19
 
20
20
  ```python
21
+ import pprint
21
22
  pprint.pprint(iloads_html(iopen("https://harga-emas.org/")), depth=10)
22
23
  pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
23
24
  ```
@@ -17,6 +17,7 @@ def iprint(
17
17
  Color menggunakan colorama Fore + Back + Style
18
18
 
19
19
  ```python
20
+ import colorama
20
21
  iprint(
21
22
  'yang ini',
22
23
  {'12':12,'sdsd':{'12':21,'as':[88]}},